[ { "id": 0, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Tara Henderson\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") )" }, { "id": 1, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Paul Jones\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 2, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Courtney King\"" }, { "id": 3, "SQL": "select transaction_id from master_txn_table where customers = \"Matthew James\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 4, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') order by sum(debit) desc limit 1" }, { "id": 5, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 6, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Bicycle retailing\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 7, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Aeronautical Equipment\" " }, { "id": 8, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Motorbike \") and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 9, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") group by product_service order by sum(credit) desc limit 1" }, { "id": 10, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Thomas Sherman\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 11, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"George Graves\" ) " }, { "id": 12, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Loan Payable\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 13, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 14, "SQL": "select sum(credit) from master_txn_table where product_service = \"Popular music shows\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 15, "SQL": "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,\"Biogenic municipal waste-fueled power generation\") and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 16, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sherry Montgomery\" ) " }, { "id": 17, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)group by product_service order by sum(credit) desc limit 1" }, { "id": 18, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Aaron Ferguson\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 19, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Construction management services\") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 20, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 21, "SQL": "select transaction_date from master_txn_table where customers = \"Cheryl Harrington\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 22, "SQL": "select transaction_date 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 = \"Natural oils\" order by transaction_date asc limit 1 " }, { "id": 23, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Margaret Fowler\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') )" }, { "id": 24, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jonathan Gonzalez\" ) " }, { "id": 25, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 26, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Kari Ballard\"" }, { "id": 27, "SQL": "select transaction_id from master_txn_table where product_service = \"Home Therapy\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 28, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 29, "SQL": "select transaction_date from master_txn_table where customers = \"Christopher Watson\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 30, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Maria Potts\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 31, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Stanley Reid\" ) " }, { "id": 32, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Jesus Hess\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) ) " }, { "id": 33, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Kelly Rodriguez\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) )" }, { "id": 34, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Youth guidance services\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 35, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Contracts\" " }, { "id": 36, "SQL": "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,\"Retailing Sleepers\") and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 37, "SQL": "select transaction_date from master_txn_table where customers = \"Jennifer Cummings\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 38, "SQL": "select transaction_date from master_txn_table where customers = \"Jade Stephenson\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 39, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') order by sum(debit) desc limit 1" }, { "id": 40, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 41, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Jorge Edwards\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 42, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 43, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Derek David\"" }, { "id": 44, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Elizabeth Herrera\"" }, { "id": 45, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Richard Petersen\" ) " }, { "id": 46, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Justin Brown\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 47, "SQL": "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,\"Nonmetallic mineral ore exploration\") and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 48, "SQL": "select transaction_date from master_txn_table where customers = \"Tammy Fleming\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 49, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') order by sum(debit) desc limit 1" }, { "id": 50, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Melody Cole\" order by transaction_date limit 1" }, { "id": 51, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Kyle George\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 52, "SQL": "select transaction_id from master_txn_table where product_service = \"attached and detached units\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 53, "SQL": "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,\"Diving equipment retailing\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 54, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') group by billing_city" }, { "id": 55, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 56, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Kimberly Rhodes\" order by transaction_date limit 1" }, { "id": 57, "SQL": "select transaction_date from master_txn_table where customers = \"Kathleen Lyons\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 58, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 59, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Andrea Chen\"" }, { "id": 60, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Timothy Townsend\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 61, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Janet Garrison\" ) " }, { "id": 62, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") order by sum(debit) desc limit 1" }, { "id": 63, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Heather Ferguson DDS' or vendor = 'Heather Ferguson DDS'" }, { "id": 64, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Taylor Hurley\" and transaction_type = 'invoice'" }, { "id": 65, "SQL": "select transaction_date from master_txn_table where customers = \"Daniel Soto\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 66, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 67, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 68, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Alexis Fletcher\" order by transaction_date limit 1" }, { "id": 69, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Christopher Brooks\" and transaction_type = 'invoice'" }, { "id": 70, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Timothy Gonzalez\" ) " }, { "id": 71, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Samuel Wright\" and transaction_type = 'invoice'" }, { "id": 72, "SQL": "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\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 73, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Timothy Nguyen\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 74, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 75, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Wayne Gonzales\" and transaction_type = 'payment' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') )" }, { "id": 76, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Theresa Thompson\" order by transaction_date limit 1" }, { "id": 77, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 78, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 79, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Recognition software for government and legal purposes\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 80, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Brian Brown\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 81, "SQL": "select transaction_id from master_txn_table where customers = \"Jaclyn Anderson\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 82, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Howard Christian\" and transaction_type = 'payment' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') ) " }, { "id": 83, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Coffee and snack shops\") and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 84, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Emma Adams\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 85, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Kelly Marsh\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 86, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Maintenance and Repairs\") and vendor = \"Nicholas Perez\"" }, { "id": 87, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Lisa Young\" order by transaction_date limit 1" }, { "id": 88, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brianna Harris\" ) " }, { "id": 89, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Design and management services \") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 90, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 91, "SQL": "select transaction_date from master_txn_table where customers = \"Leah Hernandez\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 92, "SQL": "select transaction_date from master_txn_table where customers = \"Patricia Cervantes\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 93, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kelly Black\" ) " }, { "id": 94, "SQL": "select transaction_id from master_txn_table where product_service = \"Construction management\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 95, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Invitations\" " }, { "id": 96, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 97, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 98, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Accounts Receivable (A/R)\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 99, "SQL": "select transaction_date from master_txn_table where customers = \"Douglas Schneider\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 100, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Andrew Baker\" ) " }, { "id": 101, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Adam Williams\" ) " }, { "id": 102, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Carbon dioxide\" " }, { "id": 103, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Robert Boyer\" and transaction_type = 'invoice'" }, { "id": 104, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Daisy Payne\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) )" }, { "id": 105, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Jon Williams\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 106, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 107, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Nathan Hull\" ) " }, { "id": 108, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 109, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Michael Richmond\"" }, { "id": 110, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sara Fisher\" ) " }, { "id": 111, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 112, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Sabrina Rivera\" order by transaction_date limit 1" }, { "id": 113, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Money Management\" " }, { "id": 114, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Amber Stanton\" ) " }, { "id": 115, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Madison Boyd\" ) " }, { "id": 116, "SQL": "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,\"Design and management services \") and 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') " }, { "id": 117, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date) AND date(current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 118, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Edward Hill\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 119, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Tyler Arnold\"" }, { "id": 120, "SQL": "select max(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 = \"Donald Sherman\" and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 121, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 122, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kevin Duffy\" ) " }, { "id": 123, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Robert Wise\" order by transaction_date limit 1" }, { "id": 124, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 125, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 126, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') order by sum(debit) desc limit 1" }, { "id": 127, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') group by billing_city" }, { "id": 128, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Zoe Barnes\"" }, { "id": 129, "SQL": "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,\"Gifts and grants\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 130, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 131, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Cody Kerr\" ) " }, { "id": 132, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Jennifer Moore PhD\"" }, { "id": 133, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Kathleen James\"" }, { "id": 134, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 135, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 136, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jennifer Johnson\" order by transaction_date limit 1" }, { "id": 137, "SQL": "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,\"Fast food restaurants\") and 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') " }, { "id": 138, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 139, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Debra Shepard\"" }, { "id": 140, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Michael Oconnor\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') )" }, { "id": 141, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 142, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 143, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brianna Rojas\" ) " }, { "id": 144, "SQL": "select transaction_id from master_txn_table where customers = \"Matthew Steele\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 145, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Judith Mckenzie\" ) " }, { "id": 146, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 147, "SQL": "select transaction_date 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\" order by transaction_date asc limit 1 " }, { "id": 148, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 149, "SQL": "select transaction_date 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 = \"Flowers\" order by transaction_date asc limit 1 " }, { "id": 150, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 151, "SQL": "select max(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 = \"Ruth Archer\" and 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') " }, { "id": 152, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 153, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") order by sum(debit) desc limit 1" }, { "id": 154, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Manufacturing eucalyptus oil\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 155, "SQL": "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,\"Constructing bangalow\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 156, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Paul Robinson\" order by transaction_date limit 1" }, { "id": 157, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Shawn Thompson\" ) " }, { "id": 158, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Beth Martinez\" ) " }, { "id": 159, "SQL": "select product_service, 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 transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') group by product_service order by sum(credit) desc limit 1" }, { "id": 160, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 161, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Anthony Walls\" ) " }, { "id": 162, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Oil field Machinery\" " }, { "id": 163, "SQL": "select transaction_id from master_txn_table where customers = \"Vincent Johnson\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 164, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Karen Thomas\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 165, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Henry Galvan\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 166, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Suzanne Hernandez' or vendor = 'Suzanne Hernandez'" }, { "id": 167, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Gail Simpson\" ) " }, { "id": 168, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Citronella oil\" " }, { "id": 169, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 170, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 171, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Leslie Lopez' or vendor = 'Leslie Lopez'" }, { "id": 172, "SQL": "select sum(credit) from master_txn_table where product_service = \"Copying\" and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 173, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Donald Franco\" order by transaction_date limit 1" }, { "id": 174, "SQL": "select avg(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 = \"Gregory Hernandez\" and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 175, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"John Singh\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 176, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Russell Shelton\" ) " }, { "id": 177, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and 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') " }, { "id": 178, "SQL": "select transaction_id from master_txn_table where product_service = \"Distressed Securities\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 179, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by billing_city" }, { "id": 180, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') group by billing_city" }, { "id": 181, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 182, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 183, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 184, "SQL": "select transaction_id from master_txn_table where product_service = \"Construction activities\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 185, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Michael Valencia\"" }, { "id": 186, "SQL": "select transaction_date from master_txn_table where customers = \"Lindsay Mccoy\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 187, "SQL": "select transaction_date from master_txn_table where customers = \"Jennifer Chandler\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 188, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") group by product_service order by sum(credit) desc limit 1" }, { "id": 189, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Christian Fernandez\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 190, "SQL": "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,\"Oxygen manufacturing\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 191, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 192, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 193, "SQL": "select transaction_date 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 = \"Medical services\" order by transaction_date asc limit 1 " }, { "id": 194, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Uncategorized Expense\") and vendor = \"Heather Valentine\"" }, { "id": 195, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 196, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') order by sum(debit) desc limit 1" }, { "id": 197, "SQL": "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,\"Fluorocarbon gases manufacturing\") and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 198, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Foster care placement services\") and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 199, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 200, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 201, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 202, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Brian Christian\" order by transaction_date limit 1" }, { "id": 203, "SQL": "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,\"Coal Power generation\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 204, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name 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 account_type in ('Expense','Other Expense') " }, { "id": 205, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 206, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Jill Stout\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 207, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jeremy Lester\" order by transaction_date limit 1" }, { "id": 208, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jacqueline Gonzales\" and transaction_type = 'invoice'" }, { "id": 209, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Amanda Steele\" ) " }, { "id": 210, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 211, "SQL": "select sum(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"--\" " }, { "id": 212, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 213, "SQL": "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,\"Design and management services \") 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') " }, { "id": 214, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Acetylene\" " }, { "id": 215, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kristopher Sims\" ) " }, { "id": 216, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') order by sum(debit) desc limit 1" }, { "id": 217, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 218, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Phillip Rivera\" order by transaction_date limit 1" }, { "id": 219, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Stephen Fitzgerald\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 220, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and 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') " }, { "id": 221, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Michael Gordon\" ) " }, { "id": 222, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Morgan Clarke\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 223, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Annette Collins\"" }, { "id": 224, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Equipment Repairs\") and vendor = \"John Stein\"" }, { "id": 225, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 226, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Erin Shelton\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 227, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Bridget Boyd\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 228, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Catherine Chen\" ) " }, { "id": 229, "SQL": "select transaction_date from master_txn_table where customers = \"Matthew Douglas\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 230, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 231, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Andre Lee\" order by transaction_date limit 1" }, { "id": 232, "SQL": "select max(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 = \"Samuel Thompson\" and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 233, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 234, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'William Shelton' or vendor = 'William Shelton'" }, { "id": 235, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Megan Richards\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 236, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Julie Hampton\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) ) " }, { "id": 237, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 238, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Gary Mcclure\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) ) " }, { "id": 239, "SQL": "select min(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 = \"Monica Robinson\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 240, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 241, "SQL": "select transaction_id from master_txn_table where customers = \"Heather Young\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 242, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Angela Fox\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 243, "SQL": "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,\"Campground and RV park services\") 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') " }, { "id": 244, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Danny Padilla\" order by transaction_date limit 1" }, { "id": 245, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Donald Forbes\" and account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 246, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Lori Berry\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 247, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Todd Stone\"" }, { "id": 248, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 249, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Bailey Obrien\" ) " }, { "id": 250, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Casey Spears\" ) " }, { "id": 251, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 252, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 253, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Christopher Haynes\" order by transaction_date limit 1" }, { "id": 254, "SQL": "select transaction_id from master_txn_table where product_service = \"Abandoned Infant\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 255, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Dawn Anderson\" ) " }, { "id": 256, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Glenn Fuller\"" }, { "id": 257, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Gina Morales' or vendor = 'Gina Morales'" }, { "id": 258, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 259, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Daniel Campbell\" order by transaction_date limit 1" }, { "id": 260, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Services\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 261, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Amanda Tucker\" ) " }, { "id": 262, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Nathaniel Lee\" order by transaction_date limit 1" }, { "id": 263, "SQL": "select sum(credit) from master_txn_table where product_service = \"Organic Gases\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 264, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Michael Navarro\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 265, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Carrie Butler\" ) " }, { "id": 266, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Amber Little\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 267, "SQL": "select max(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 = \"Cory Moses\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 268, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') group by billing_city" }, { "id": 269, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 270, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Nursing and health services\") and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 271, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 272, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 273, "SQL": "select transaction_id from master_txn_table where product_service = \"Memberships\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 274, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Ricardo Gibson\" order by transaction_date limit 1" }, { "id": 275, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 276, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Jeanne Brown\" and transaction_type = 'payment' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') ) " }, { "id": 277, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") and account_type in ('Expense','Other Expense') " }, { "id": 278, "SQL": "select min(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 = \"Elaine George\" and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 279, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 280, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 281, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Commodity Markets\" " }, { "id": 282, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Evan Carlson\" ) " }, { "id": 283, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by billing_city" }, { "id": 284, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Amanda Clark\" order by transaction_date limit 1" }, { "id": 285, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Alexander Cook\" ) " }, { "id": 286, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Wanda Espinoza\" ) " }, { "id": 287, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Nancy Clark\" ) " }, { "id": 288, "SQL": "select transaction_date from master_txn_table where customers = \"Phillip Stout\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 289, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Reprographic services\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 290, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kenneth Kaiser\" ) " }, { "id": 291, "SQL": "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,\"Computer Repairs\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 292, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) group by billing_city" }, { "id": 293, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Michael Schroeder\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 294, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"David Castro\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 295, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 296, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 297, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Alicia Frey\" and transaction_type = 'payment' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') )" }, { "id": 298, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 299, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Ceremony & reception venue\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 300, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Heather Cox\"" }, { "id": 301, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Rhonda Meyers\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 302, "SQL": "select transaction_date 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 = \"Mailbox Services\" order by transaction_date asc limit 1 " }, { "id": 303, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 304, "SQL": "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,\"Bicycle retailing\") and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 305, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Elizabeth Huffman\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 306, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 307, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Nathaniel Sanchez\" ) " }, { "id": 308, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Krystal Harrell\" ) " }, { "id": 309, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Metal ore exploration\") and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 310, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Cindy Estrada\" ) " }, { "id": 311, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sherry Prince\" ) " }, { "id": 312, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Industrial manufacturing\") and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 313, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'James Knight' or vendor = 'James Knight'" }, { "id": 314, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 315, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') group by billing_city" }, { "id": 316, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jenna Reyes\" ) " }, { "id": 317, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"AI Courses\" " }, { "id": 318, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Jessica Dalton\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') )" }, { "id": 319, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 320, "SQL": "select transaction_id from master_txn_table where customers = \"John Townsend\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 321, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Alicia Medina\" ) " }, { "id": 322, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Diana King\" and account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 323, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 324, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Retailing Wardrobe\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 325, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Jesse Kirk\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) ) " }, { "id": 326, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Taylor Knapp\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') ) " }, { "id": 327, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 328, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' 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') " }, { "id": 329, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date) AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 330, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Adam Adams\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 331, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 332, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ashley Hull\" ) " }, { "id": 333, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Project planning and economic assessments\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 334, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 335, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Laurie Scott\" ) " }, { "id": 336, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Cost of Labor\") and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 337, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 338, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Katherine Howard\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) ) " }, { "id": 339, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Ashley Patterson\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 340, "SQL": "select transaction_date from master_txn_table where customers = \"Brandon Robertson\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 341, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Providing dealing services\") and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 342, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Christina Riley\" ) " }, { "id": 343, "SQL": "select max(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 = \"Devin Cox\" and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 344, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Kenneth Young' or vendor = 'Kenneth Young'" }, { "id": 345, "SQL": "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,\"Offering equity long-only\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 346, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 347, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Constructing townhouses\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 348, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Wendy Beasley\" ) " }, { "id": 349, "SQL": "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 = \"Adam Mccarty\" and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 350, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Seth Rodriguez\" ) " }, { "id": 351, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Retailing home office furniture\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 352, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 353, "SQL": "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,\"Offering fixed income funds\") and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 354, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Pool maintenance\") and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 355, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 356, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 357, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 358, "SQL": "select transaction_date from master_txn_table where customers = \"Kenneth Wolf\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 359, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Industrial manufacturing\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 360, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) group by billing_city" }, { "id": 361, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"James Dixon\" order by transaction_date limit 1" }, { "id": 362, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 363, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Thomas Hurley' or vendor = 'Thomas Hurley'" }, { "id": 364, "SQL": "select sum(credit) from master_txn_table where product_service = \"LAN\" and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 365, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"William Patel\" ) " }, { "id": 366, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 367, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 368, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Alan Trujillo\" ) " }, { "id": 369, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Non-musical performances\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 370, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Appearances and speeches\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 371, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 372, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Toni Fernandez\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 373, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Promotional\") and vendor = \"Justin Martinez\"" }, { "id": 374, "SQL": "select transaction_id from master_txn_table where customers = \"Christine Rivera\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 375, "SQL": "select transaction_date from master_txn_table where customers = \"Maria Walker\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 376, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') group by billing_city" }, { "id": 377, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 378, "SQL": "select transaction_date from master_txn_table where customers = \"Kathleen Owens\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 379, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 380, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Patrick Leonard\" order by transaction_date limit 1" }, { "id": 381, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Kenneth Brown\"" }, { "id": 382, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Leah Chaney\" ) " }, { "id": 383, "SQL": "select product_service, 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 transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') group by product_service order by sum(credit) desc limit 1" }, { "id": 384, "SQL": "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,\"Teen outreach services\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 385, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 386, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Dwayne Potts\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 387, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') and account_type in ('Expense','Other Expense') " }, { "id": 388, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 389, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Laura Montes\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 390, "SQL": "select product_service, 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 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') group by product_service order by sum(credit) desc limit 1" }, { "id": 391, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Samantha Farley\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) )" }, { "id": 392, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jon Day\" order by transaction_date limit 1" }, { "id": 393, "SQL": "select transaction_date from master_txn_table where customers = \"Maria Lawrence\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 394, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Yolanda Stephens\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") )" }, { "id": 395, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jeremiah Wilson\" ) " }, { "id": 396, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 397, "SQL": "select sum(credit) from master_txn_table where product_service = \"Macs\" and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 398, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 399, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Valerie Bowers\"" }, { "id": 400, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 401, "SQL": "select sum(credit) from master_txn_table where product_service = \"Meals\" and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 402, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 403, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Michelle Mahoney\"" }, { "id": 404, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 405, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kyle Long\" ) " }, { "id": 406, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Taylor Price\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 407, "SQL": "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,\"Breeding services\") and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 408, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jessica Johnson\" and transaction_type = 'invoice'" }, { "id": 409, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jody Ellis\" ) " }, { "id": 410, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 411, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 412, "SQL": "select transaction_date from master_txn_table where customers = \"Debbie Lopez\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 413, "SQL": "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 accommodation services\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 414, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Casey Spears\" ) " }, { "id": 415, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Stephanie Wright' or vendor = 'Stephanie Wright'" }, { "id": 416, "SQL": "select transaction_id from master_txn_table where customers = \"Mark Fuller\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 417, "SQL": "select transaction_id from master_txn_table where customers = \"Gary Lambert\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 418, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 419, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 420, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Andrew Williams\" ) " }, { "id": 421, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Flowers\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 422, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Other food services\") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 423, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Peter Avery\"" }, { "id": 424, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Quality management assessment\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 425, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lawrence Williams\" ) " }, { "id": 426, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Deanna Kelly\" ) " }, { "id": 427, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Exercise equipment retailing\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 428, "SQL": "select transaction_date 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 = \"Flowers\" order by transaction_date asc limit 1 " }, { "id": 429, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 430, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 431, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Child abuse prevention services\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 432, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') 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') order by sum(debit) desc limit 1" }, { "id": 433, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Isaac Martinez\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) ) " }, { "id": 434, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 435, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 436, "SQL": "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 = \"Bruce Jones\" 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') " }, { "id": 437, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Joshua Harris\" order by transaction_date limit 1" }, { "id": 438, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Andre Lee\" order by transaction_date limit 1" }, { "id": 439, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Baby strollers\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 440, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Joseph Mccormick' or vendor = 'Joseph Mccormick'" }, { "id": 441, "SQL": "select transaction_id from master_txn_table where customers = \"Emma Kirby\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 442, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 443, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Business services centers\") and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 444, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 445, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Bradley Ortiz' or vendor = 'Bradley Ortiz'" }, { "id": 446, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Whitney Carpenter\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 447, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Wendy Brown\" ) " }, { "id": 448, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Lisa Benton\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') )" }, { "id": 449, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Elizabeth Hart\" ) " }, { "id": 450, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Omar Powers\" ) " }, { "id": 451, "SQL": "select transaction_date 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 = \"Non-nuclear\" order by transaction_date asc limit 1 " }, { "id": 452, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and 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') order by sum(debit) desc limit 1" }, { "id": 453, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Luis Cardenas\"" }, { "id": 454, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Registration for tournaments and matches\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 455, "SQL": "select transaction_id from master_txn_table where product_service = \"Bars and Nightclubs\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 456, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Susan Orr\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 457, "SQL": "select transaction_id from master_txn_table where customers = \"Ian Day\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 458, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 459, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Party favors\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 460, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Carbon dioxide manufacturing\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 461, "SQL": "select avg(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 = \"Lynn Martinez\" and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 462, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Retailing stationary sofas/sofa-sleepers\") and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 463, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jason King\" ) " }, { "id": 464, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Jason Ewing\"" }, { "id": 465, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) group by billing_city" }, { "id": 466, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 467, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Laura Hansen' or vendor = 'Laura Hansen'" }, { "id": 468, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 469, "SQL": "select avg(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 = \"Megan Hall\" and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 470, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Unapplied Cash Payment Income\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 471, "SQL": "select transaction_id from master_txn_table where customers = \"Patrick Becker\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 472, "SQL": "select transaction_id from master_txn_table where customers = \"Stephen Bryant\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 473, "SQL": "select transaction_id from master_txn_table where customers = \"Katie Sullivan\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 474, "SQL": "select transaction_date from master_txn_table where customers = \"Marco Hopkins\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 475, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 476, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Pool maintenance\") and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 477, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Data storage and management services\") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 478, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Symphony\" " }, { "id": 479, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Rebecca Reese\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) )" }, { "id": 480, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 481, "SQL": "select transaction_date 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 = \"Housing\" order by transaction_date asc limit 1 " }, { "id": 482, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Railcar rental or leasing\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 483, "SQL": "select max(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 = \"Darrell Logan MD\" and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 484, "SQL": "select avg(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 = \"Isaac Davis\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 485, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 486, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Kyle Bradshaw\"" }, { "id": 487, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Edwin Hernandez\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) ) " }, { "id": 488, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Derrick Maldonado\" order by transaction_date limit 1" }, { "id": 489, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Tina Perez\"" }, { "id": 490, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Darryl Flores\" ) " }, { "id": 491, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 492, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Data processing\") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 493, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Andrea Cox DVM\" ) " }, { "id": 494, "SQL": "select transaction_id from master_txn_table where product_service = \"Packing\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 495, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Jessica Gill\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') )" }, { "id": 496, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Eric Nichols\"" }, { "id": 497, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Providing shunting trailers in rail terminals\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 498, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 499, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Mary Matthews\"" }, { "id": 500, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 501, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Leslie Gaines\" ) " }, { "id": 502, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Jacqueline Vaughn\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') )" }, { "id": 503, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lauren Lawson\" ) " }, { "id": 504, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 505, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Townhouses\" " }, { "id": 506, "SQL": "select transaction_date from master_txn_table where customers = \"Jerry Nunez\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 507, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' 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') " }, { "id": 508, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 509, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 510, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 511, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Eric Cannon' or vendor = 'Eric Cannon'" }, { "id": 512, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Adam Mcintyre\"" }, { "id": 513, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Andrew Allen\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") ) " }, { "id": 514, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jennifer Scott\" ) " }, { "id": 515, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"golf courses and country clubs\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 516, "SQL": "select min(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 = \"William Peters\" and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 517, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brandy James\" ) " }, { "id": 518, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"James Mann\" order by transaction_date limit 1" }, { "id": 519, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") order by sum(debit) desc limit 1" }, { "id": 520, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Breeding\" " }, { "id": 521, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lee Williams\" ) " }, { "id": 522, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Anthony Khan\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 523, "SQL": "select max(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 = \"Craig Rubio\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 524, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Barbara Conley\" order by transaction_date limit 1" }, { "id": 525, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 526, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Offering equity long-only\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 527, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 528, "SQL": "select transaction_date from master_txn_table where customers = \"Mikayla Keller\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 529, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Carlos Newton\"" }, { "id": 530, "SQL": "select transaction_date from master_txn_table where customers = \"Andrea Osborne\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 531, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 532, "SQL": "select transaction_id from master_txn_table where customers = \"Cole Mckinney\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 533, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"James Webb\" ) " }, { "id": 534, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Peter Eaton\" and transaction_type = 'invoice'" }, { "id": 535, "SQL": "select transaction_date from master_txn_table where customers = \"Chad Jones\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 536, "SQL": "select transaction_date from master_txn_table where customers = \"Ronald Lopez\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 537, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Baby accessories\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 538, "SQL": "select max(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 = \"Michael Morales\" and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 539, "SQL": "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 = \"Ellen Reed\" and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 540, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Taxes & Licenses\") and vendor = \"Cheryl Calderon\"" }, { "id": 541, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by billing_city" }, { "id": 542, "SQL": "select transaction_id from master_txn_table where customers = \"Morgan Lawrence\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 543, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Anthony Rich\" ) " }, { "id": 544, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"LAN\" " }, { "id": 545, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 546, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 547, "SQL": "select transaction_id from master_txn_table where product_service = \"Financial Planning\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 548, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 549, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Biogenic municipal waste-fueled power generation\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 550, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Contract mining\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 551, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 552, "SQL": "select transaction_date 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 = \"Youth community\" order by transaction_date asc limit 1 " }, { "id": 553, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Disposal Fees\") and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 554, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jodi Chang\" ) " }, { "id": 555, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 556, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lori Stevenson\" ) " }, { "id": 557, "SQL": "select transaction_date from master_txn_table where customers = \"Susan Holden\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 558, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Anthony Rodriguez\"" }, { "id": 559, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Susan Myers\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 560, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Blake Vargas\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date) AND date(current_date) )" }, { "id": 561, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Randall Lewis\" ) " }, { "id": 562, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 563, "SQL": "select transaction_date 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 = \"Therapy\" order by transaction_date asc limit 1 " }, { "id": 564, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 565, "SQL": "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 industrial inorganic gases\") and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 566, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Kimberly Zimmerman MD\" and transaction_type = 'invoice'" }, { "id": 567, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') order by sum(debit) desc limit 1" }, { "id": 568, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Caroline Matthews\" ) " }, { "id": 569, "SQL": "select sum(credit) from master_txn_table where product_service = \"Inorganic Gases\" 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') " }, { "id": 570, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 571, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brenda Carter\" ) " }, { "id": 572, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Joseph Avila\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 573, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 574, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 575, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Melissa Shannon' or vendor = 'Melissa Shannon'" }, { "id": 576, "SQL": "select transaction_id from master_txn_table where product_service = \"Party favors\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 577, "SQL": "select transaction_date from master_txn_table where customers = \"Kristie Oliver\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 578, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Christian Sanders\" ) " }, { "id": 579, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 580, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Brittany Mcbride\" order by transaction_date limit 1" }, { "id": 581, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Marcus Garcia\" and transaction_type = 'invoice'" }, { "id": 582, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Raymond Quinn\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') )" }, { "id": 583, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Christina Watkins\" ) " }, { "id": 584, "SQL": "select transaction_date 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 = \"Boat\" order by transaction_date asc limit 1 " }, { "id": 585, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Amy Carlson\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') ) " }, { "id": 586, "SQL": "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 = \"Christopher Huffman\" and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 587, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 588, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jon Rodriguez\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 589, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Lisa Gates' or vendor = 'Lisa Gates'" }, { "id": 590, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sara Thomas\" ) " }, { "id": 591, "SQL": "select transaction_id from master_txn_table where customers = \"Derek Berger\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 592, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 593, "SQL": "select transaction_date from master_txn_table where customers = \"Michelle Mcknight\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 594, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 595, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 596, "SQL": "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 financial investment management services\") and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 597, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name 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 account_type in ('Expense','Other Expense') " }, { "id": 598, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 599, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Michelle Rodgers\"" }, { "id": 600, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 601, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Danny Peterson\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) )" }, { "id": 602, "SQL": "select avg(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 = \"Maria Medina\" and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 603, "SQL": "select sum(credit) from master_txn_table where product_service = \"Ventilation cleaning\" and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 604, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jessica Olsen\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 605, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Providing trust and fiduciary services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 606, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Manufacturing industrial inorganic gases\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 607, "SQL": "select transaction_date from master_txn_table where customers = \"Tracy Phillips\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 608, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') order by sum(debit) desc limit 1" }, { "id": 609, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 610, "SQL": "select transaction_date from master_txn_table where customers = \"Nicole Reynolds\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 611, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Daniel Castaneda\" order by transaction_date limit 1" }, { "id": 612, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Angela Galloway\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 613, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 614, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Michael Barnes\"" }, { "id": 615, "SQL": "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,\"Occupational and vocational therapy\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 616, "SQL": "select transaction_id from master_txn_table where customers = \"Ronald Leon\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 617, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Lawrence White\"" }, { "id": 618, "SQL": "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 support for money investment securities\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 619, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Brooke David\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 620, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 621, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Evan Bartlett IV\" ) " }, { "id": 622, "SQL": "select max(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 = \"Andrew Chandler\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 623, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 624, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Tonya Fox\"" }, { "id": 625, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Allison Wilson\" ) " }, { "id": 626, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Mary Carrillo\"" }, { "id": 627, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 628, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"James Schmidt\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 629, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"David Reyes\" ) " }, { "id": 630, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Jesse Bender\"" }, { "id": 631, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 632, "SQL": "select sum(credit) from master_txn_table where product_service = \"Quality accreditation\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 633, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"John Warner\" ) " }, { "id": 634, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Zachary Snyder\" ) " }, { "id": 635, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Danny Garrett\" ) " }, { "id": 636, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Other nonnuclear power generation\") and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 637, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 638, "SQL": "select transaction_id from master_txn_table where customers = \"Steven Frank\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 639, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 640, "SQL": "select product_service, 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 transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') group by product_service order by sum(credit) desc limit 1" }, { "id": 641, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 642, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 643, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"William Bennett\" ) " }, { "id": 644, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 645, "SQL": "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,\"Computer software and software application training\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 646, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 647, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 648, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Michelle Baxter\" and transaction_type = 'invoice'" }, { "id": 649, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Other nonnuclear power generation\") and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 650, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Building Repairs\") and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 651, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 652, "SQL": "select transaction_date from master_txn_table where customers = \"Tracy Schmidt\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 653, "SQL": "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,\"Bank Charges\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 654, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Baby formula and food\") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 655, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Christine Flores\" ) " }, { "id": 656, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 657, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Ruben Gonzalez\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 658, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jason Thomas\" and transaction_type = 'invoice'" }, { "id": 659, "SQL": "select sum(credit) from master_txn_table where product_service = \"Parking lot and driveway washing\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 660, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Christian Perry\" order by transaction_date limit 1" }, { "id": 661, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Felicia Bryan\" ) " }, { "id": 662, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Cheryl Lynch\" ) " }, { "id": 663, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jeanette Gallegos\" ) " }, { "id": 664, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Sarah Potter\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 665, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 666, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"William Fox\" ) " }, { "id": 667, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Opera\" " }, { "id": 668, "SQL": "select transaction_id from master_txn_table where product_service = \"Window washing\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 669, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Richard Guerrero\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') ) " }, { "id": 670, "SQL": "select transaction_id from master_txn_table where product_service = \"Natural oils\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 671, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 672, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Aircraft rental or leasing\") and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 673, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Julie Barnes\" ) " }, { "id": 674, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Pamela Robinson\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 675, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 676, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Matthew Murphy\" ) " }, { "id": 677, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Michael Willis\" ) " }, { "id": 678, "SQL": "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 marine supplies (except pleasure)\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 679, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Michael Lane\" and transaction_type = 'invoice'" }, { "id": 680, "SQL": "select min(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 = \"Jean Morales\" and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 681, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Casey Hernandez\" ) " }, { "id": 682, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Bridget Browning\" and transaction_type = 'payment' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') )" }, { "id": 683, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 684, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Decks and Patios\") and vendor = \"Michael Smith\"" }, { "id": 685, "SQL": "select product_service, 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 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') group by product_service order by sum(credit) desc limit 1" }, { "id": 686, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Katherine Burke\" ) " }, { "id": 687, "SQL": "select distinct transaction_id from master_txn_table where customers = \"James Shaw\"" }, { "id": 688, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Michelle Macias MD\" ) " }, { "id": 689, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Rebecca Alvarez\" ) " }, { "id": 690, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Adrian Moore DVM\" order by transaction_date limit 1" }, { "id": 691, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Photocopying\" " }, { "id": 692, "SQL": "select sum(credit) from master_txn_table where product_service = \"Social\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 693, "SQL": "select transaction_id from master_txn_table where customers = \"Jeffrey Page\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 694, "SQL": "select transaction_id from master_txn_table where product_service = \"Quality assessment\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 695, "SQL": "select transaction_id from master_txn_table where customers = \"Eric Potter\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 696, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Stationery & Printing\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 697, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Railroad Cars\" " }, { "id": 698, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kevin Joseph\" ) " }, { "id": 699, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by billing_city" }, { "id": 700, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Nitrogen\" " }, { "id": 701, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Private mailbox rental services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 702, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Amber Watkins\" ) " }, { "id": 703, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Livestock health services\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 704, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 705, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Cassidy Martinez\" order by transaction_date limit 1" }, { "id": 706, "SQL": "select sum(credit) from master_txn_table where product_service = \"Fishing\" and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 707, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 708, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 709, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Renee Wood\" and transaction_type = 'invoice'" }, { "id": 710, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 711, "SQL": "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 shunting trailers in rail terminals\") and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 712, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Seth Nelson\" ) " }, { "id": 713, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 714, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Cheryl Hickman\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 715, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Saddlery retailing\") and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 716, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 717, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Hannah Smith\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) )" }, { "id": 718, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Gary Harrington\" and transaction_type = 'invoice'" }, { "id": 719, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') and account_type in ('Expense','Other Expense') " }, { "id": 720, "SQL": "select sum(credit) from master_txn_table where product_service = \"Computer Programming\" and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 721, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Mario Patrick\" order by transaction_date limit 1" }, { "id": 722, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Caleb Vasquez\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 723, "SQL": "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,\"Coordinators\") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 724, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 725, "SQL": "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,\"Maintenance and Repairs\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 726, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Elizabeth Larson\" ) " }, { "id": 727, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Computer Repairs\") and vendor = \"Ryan Estrada\"" }, { "id": 728, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Justin Hunt\"" }, { "id": 729, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 730, "SQL": "select transaction_date from master_txn_table where customers = \"Sheila Johnson\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 731, "SQL": "select sum(credit) from master_txn_table where product_service = \"Railroad Cars\" and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 732, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Data storage management\" " }, { "id": 733, "SQL": "select transaction_id from master_txn_table where customers = \"Dana Finley\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 734, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Angela Wolfe DDS\" order by transaction_date limit 1" }, { "id": 735, "SQL": "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 = \"Harry Stout\" and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 736, "SQL": "select avg(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 = \"Laurie Mosley\" and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 737, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 738, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Alicia Williams' or vendor = 'Alicia Williams'" }, { "id": 739, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Wholesaling locomotives\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 740, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Joshua Gordon\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 741, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Vincent Ward\" ) " }, { "id": 742, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Angela Lee\"" }, { "id": 743, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") and account_type in ('Expense','Other Expense') " }, { "id": 744, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Carolyn Gardner\" ) " }, { "id": 745, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Richard Lopez III\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') ) " }, { "id": 746, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 747, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Development of software products for Macs\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 748, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 749, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Steven Lee\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 750, "SQL": "select transaction_date from master_txn_table where customers = \"Dana Thomas\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 751, "SQL": "select transaction_date from master_txn_table where customers = \"Nicholas Brown\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 752, "SQL": "select transaction_date from master_txn_table where customers = \"Richard Edwards\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 753, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by billing_city" }, { "id": 754, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Wholesaling boats (except pleasure)\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 755, "SQL": "select transaction_date from master_txn_table where customers = \"William Perry\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 756, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Taxes & Licenses\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 757, "SQL": "select transaction_date from master_txn_table where customers = \"Michele Roberts\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 758, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Cameron Reyes\" and transaction_type = 'invoice'" }, { "id": 759, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 760, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 761, "SQL": "select transaction_date from master_txn_table where customers = \"Margaret Walker\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 762, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 763, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Christopher Clark\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 764, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Joel Hudson\"" }, { "id": 765, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Rebekah Nelson\" order by transaction_date limit 1" }, { "id": 766, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Window washing\") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 767, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Frederick Stewart\" ) " }, { "id": 768, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 769, "SQL": "select sum(credit) from master_txn_table where product_service = \"Teen outreach\" and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 770, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 771, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Bradley Mcmahon\" ) " }, { "id": 772, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Mary Bird\" and transaction_type = 'invoice'" }, { "id": 773, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 774, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Providing brokerage services\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 775, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Ronald Reyes\"" }, { "id": 776, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 777, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Christopher Lee\" ) " }, { "id": 778, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jason Guzman\"" }, { "id": 779, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Brenda Hahn\" and transaction_type = 'invoice'" }, { "id": 780, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Dairy support services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 781, "SQL": "select transaction_date 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 = \"Marine Supplies\" order by transaction_date asc limit 1 " }, { "id": 782, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 783, "SQL": "select transaction_date 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 = \"Eucalyptus oil\" order by transaction_date asc limit 1 " }, { "id": 784, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 785, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") group by billing_city" }, { "id": 786, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Lemon oil\" " }, { "id": 787, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 788, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 789, "SQL": "select transaction_id from master_txn_table where product_service = \"Distressed Securities\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 790, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Steven Lawrence\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 791, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') group by billing_city" }, { "id": 792, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Hacking Training\" " }, { "id": 793, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Meals and Entertainment\") and vendor = \"Samantha Berry\"" }, { "id": 794, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Offering equity long/short \") and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 795, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Shelby Noble\" ) " }, { "id": 796, "SQL": "select min(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 = \"Cynthia Dixon\" and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 797, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Chairs\" " }, { "id": 798, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by billing_city" }, { "id": 799, "SQL": "select transaction_id from master_txn_table where customers = \"Frank Taylor\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 800, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Registration for tournaments and matches\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 801, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 802, "SQL": "select product_service, 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 transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') group by product_service order by sum(credit) desc limit 1" }, { "id": 803, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') 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') order by sum(debit) desc limit 1" }, { "id": 804, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Wendy Zhang\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) )" }, { "id": 805, "SQL": "select transaction_date from master_txn_table where customers = \"Christopher Coleman\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 806, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Craig Parks\" ) " }, { "id": 807, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date) AND date(current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 808, "SQL": "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,\"Ethical Hacking Training\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 809, "SQL": "select min(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 = \"Susan Blair\" and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 810, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 811, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Jillian Barnes\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 812, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 813, "SQL": "select transaction_date from master_txn_table where customers = \"Robert Reese\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 814, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Alexis Sanchez\" and transaction_type = 'invoice'" }, { "id": 815, "SQL": "select transaction_id from master_txn_table where product_service = \"Strollers\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 816, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brittany Berry\" ) " }, { "id": 817, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Feasibility studies\") and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 818, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Kelli Berry\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 819, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Dustin Rodriguez\"" }, { "id": 820, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Barry Bishop\" ) " }, { "id": 821, "SQL": "select transaction_date from master_txn_table where customers = \"Amanda Griffin\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 822, "SQL": "select sum(credit) from master_txn_table where product_service = \"Miscellaneous\" and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 823, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 824, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Holly Whitaker\"" }, { "id": 825, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Marie Vega\" ) " }, { "id": 826, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 827, "SQL": "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 brokerage services\") and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 828, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Helen Sanchez\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 829, "SQL": "select sum(credit) from master_txn_table where product_service = \"Aircraft\" and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 830, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 831, "SQL": "select sum(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Clothing and footwear\" " }, { "id": 832, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Attire and accessories\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 833, "SQL": "select transaction_date 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 = \"Forestry Machinery\" order by transaction_date asc limit 1 " }, { "id": 834, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Judy Bradley\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 835, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 836, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 837, "SQL": "select transaction_date 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 = \"Repair and Maintainenance\" order by transaction_date asc limit 1 " }, { "id": 838, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Retailing bedding\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 839, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Natasha Thomas\" and transaction_type = 'invoice'" }, { "id": 840, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"James Dixon\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") )" }, { "id": 841, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 842, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Insurance\") and vendor = \"Andrea Burke\"" }, { "id": 843, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 844, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Corey Liu\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 845, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 846, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Vincent Hayden\"" }, { "id": 847, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Stacy Reed\" ) " }, { "id": 848, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Edwin Carson\" ) " }, { "id": 849, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Refunds-Allowances\") and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 850, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Christopher Brady\"" }, { "id": 851, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 852, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Flowers\") and 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') " }, { "id": 853, "SQL": "select transaction_date 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 = \"Musicians\" order by transaction_date asc limit 1 " }, { "id": 854, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Teresa Pacheco\" order by transaction_date limit 1" }, { "id": 855, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Shannon Anderson\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 856, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Lauren Alvarez\"" }, { "id": 857, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 858, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 859, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") group by billing_city" }, { "id": 860, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Joshua Reeves MD\"" }, { "id": 861, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') group by billing_city" }, { "id": 862, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 863, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Allison Lawrence\" ) " }, { "id": 864, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Abigail French\"" }, { "id": 865, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Pamela Robinson\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 866, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 867, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 868, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Copy centers\") and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 869, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 870, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Anna Simmons\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 871, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jesse Stevens\" order by transaction_date limit 1" }, { "id": 872, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Services\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 873, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Robert Rodriguez\"" }, { "id": 874, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Rebecca Flores\" order by transaction_date limit 1" }, { "id": 875, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Marissa Zamora\"" }, { "id": 876, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Charles Holland\"" }, { "id": 877, "SQL": "select transaction_id from master_txn_table where customers = \"Cassandra Buck\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 878, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 879, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Christine Ball\"" }, { "id": 880, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Joe Martin\" ) " }, { "id": 881, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Symphony performances\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 882, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Robert Miller\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 883, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Kristine Woodard\"" }, { "id": 884, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Cheryl Jefferson\" ) " }, { "id": 885, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 886, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Dustin Berry\" order by transaction_date limit 1" }, { "id": 887, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 888, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Taxes & Licenses\") and vendor = \"Michael Lee\"" }, { "id": 889, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 890, "SQL": "select transaction_id from master_txn_table where product_service = \"Youth\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 891, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Savings\") and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 892, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 893, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 894, "SQL": "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,\"Musical performances\") and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 895, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Oxygen\" " }, { "id": 896, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Baby carriers\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 897, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Glen Clark\" ) " }, { "id": 898, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 899, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brett Costa\" ) " }, { "id": 900, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Cheryl Rosario\"" }, { "id": 901, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Henry Nichols\" ) " }, { "id": 902, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"James Cervantes\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 903, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Carriers\" " }, { "id": 904, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sandra Maddox\" ) " }, { "id": 905, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Environmental impact assessment\" " }, { "id": 906, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 907, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 908, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Renee Williams' or vendor = 'Renee Williams'" }, { "id": 909, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Thomas Simmons\" ) " }, { "id": 910, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Suzanne Kelley\" order by transaction_date limit 1" }, { "id": 911, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Annette Walker MD\" ) " }, { "id": 912, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Richard Bennett\" order by transaction_date limit 1" }, { "id": 913, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Antonio Molina\"" }, { "id": 914, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Kenneth Flores\" order by transaction_date limit 1" }, { "id": 915, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Promotional\") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 916, "SQL": "select transaction_date 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 = \"Chairs\" order by transaction_date asc limit 1 " }, { "id": 917, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Becky Morales\" ) " }, { "id": 918, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Carrie Kelly' or vendor = 'Carrie Kelly'" }, { "id": 919, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Constructing duplexes\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 920, "SQL": "select transaction_date from master_txn_table where customers = \"Andre Robinson\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 921, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Wholesaling railroad cars\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 922, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Kevin Moreno\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 923, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Other accommodation services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 924, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Decks and Patios\") and vendor = \"Melissa Caldwell\"" }, { "id": 925, "SQL": "select sum(credit) from master_txn_table where product_service = \"high-rise and low-rise buildings\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 926, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Justin Martinez\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 927, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Mark Kerr\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) )" }, { "id": 928, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 929, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Lisa Orozco\" and transaction_type = 'payment' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') )" }, { "id": 930, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Wholesaling navigational instruments (except electronic)\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 931, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Providing classes in stenography and court reporting\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 932, "SQL": "select transaction_id from master_txn_table where product_service = \"Adoption\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 933, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Hotels and motel services\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 934, "SQL": "select transaction_date from master_txn_table where customers = \"Kristen Spencer\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 935, "SQL": "select transaction_id from master_txn_table where customers = \"Daniel Schroeder\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 936, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 937, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Rhonda Wolfe\"" }, { "id": 938, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 939, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 940, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date) AND date(current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 941, "SQL": "select transaction_id from master_txn_table where product_service = \"Railcar\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 942, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Daryl Garcia\" and transaction_type = 'invoice'" }, { "id": 943, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kim Kirby\" ) " }, { "id": 944, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Ariana May\" order by transaction_date limit 1" }, { "id": 945, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 946, "SQL": "select sum(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Web hosting\" " }, { "id": 947, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Development of software products for Macs\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 948, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Travis Jensen\" ) " }, { "id": 949, "SQL": "select transaction_id from master_txn_table where product_service = \"Industrial manufacturing\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 950, "SQL": "select transaction_date 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 = \"Dietary and Nutritional\" order by transaction_date asc limit 1 " }, { "id": 951, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Permits\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 952, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Providing railroad switching services\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 953, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Troy Fields\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') )" }, { "id": 954, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Olivia Bates\" ) " }, { "id": 955, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Jason Lara' or vendor = 'Jason Lara'" }, { "id": 956, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Dues & Subscriptions\") and vendor = \"Christopher Clark\"" }, { "id": 957, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jay Bean\" ) " }, { "id": 958, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Dennis Dillon\" ) " }, { "id": 959, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Jennifer Olsen\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') )" }, { "id": 960, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 961, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Joshua Newman\"" }, { "id": 962, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Eric Vasquez\"" }, { "id": 963, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Travis Torres\" order by transaction_date limit 1" }, { "id": 964, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 965, "SQL": "select sum(credit) from master_txn_table where product_service = \"Recreation\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 966, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Malik Austin\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 967, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Ashley Lutz\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 968, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Unapplied Cash Bill Payment Expense\") and vendor = \"Michael Mcdaniel\"" }, { "id": 969, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 970, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 971, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Coin operated games and rides\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 972, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Pamela Hill\" order by transaction_date limit 1" }, { "id": 973, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Steven Thompson\" and account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 974, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Taylor Estrada\" ) " }, { "id": 975, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Olivia Robertson' or vendor = 'Olivia Robertson'" }, { "id": 976, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Therapeutic services\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 977, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') group by billing_city" }, { "id": 978, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 979, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Lawrence Hubbard\"" }, { "id": 980, "SQL": "select transaction_date from master_txn_table where customers = \"Casey Horton\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 981, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 982, "SQL": "select transaction_date 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 = \"Macs\" order by transaction_date asc limit 1 " }, { "id": 983, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Katelyn Mcdowell\" ) " }, { "id": 984, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Nicole Flores\" ) " }, { "id": 985, "SQL": "select min(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 = \"Jeanette Ortega\" and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 986, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Jennifer Duncan\"" }, { "id": 987, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Megan Potter\" and transaction_type = 'payment' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') )" }, { "id": 988, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lisa Wilson\" ) " }, { "id": 989, "SQL": "select transaction_date 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 = \"Townhouses\" order by transaction_date asc limit 1 " }, { "id": 990, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Gas and Electric\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 991, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Tracey Rodriguez\"" }, { "id": 992, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Carolyn Martin\" order by transaction_date limit 1" }, { "id": 993, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Retailing master bedroom furniture\") 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') " }, { "id": 994, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ashley Mueller\" ) " }, { "id": 995, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 996, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Asset management\") and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 997, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Nicole Price\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 998, "SQL": "select transaction_date 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 = \"Apparel and shoes\" order by transaction_date asc limit 1 " }, { "id": 999, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Tiffany Cole\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 1000, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name 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 account_type in ('Expense','Other Expense') " }, { "id": 1001, "SQL": "select transaction_id from master_txn_table where customers = \"Joel Buchanan\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 1002, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ashley Waters\" ) " }, { "id": 1003, "SQL": "select transaction_date 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 = \"Equity long-only\" order by transaction_date asc limit 1 " }, { "id": 1004, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Gregory Robinson\" ) " }, { "id": 1005, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Christopher Norris\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') ) " }, { "id": 1006, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 1007, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 1008, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Angela Waters\" ) " }, { "id": 1009, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Billy Rodriguez\" ) " }, { "id": 1010, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Ryan Brooks\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') )" }, { "id": 1011, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Christine Harrell\" ) " }, { "id": 1012, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Christine Barrett\" order by transaction_date limit 1" }, { "id": 1013, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date) AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 1014, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date) AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 1015, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 1016, "SQL": "select transaction_date 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 = \"Fixed income\" order by transaction_date asc limit 1 " }, { "id": 1017, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Utilities\") and vendor = \"Diana King\"" }, { "id": 1018, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Gregory Gilbert\"" }, { "id": 1019, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Workers Compensation\") and vendor = \"Michael Diaz\"" }, { "id": 1020, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Karen Thomas\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 1021, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Evan Garrett\" and transaction_type = 'invoice'" }, { "id": 1022, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 1023, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Veronica King\" ) " }, { "id": 1024, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Elizabeth Kelly\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') )" }, { "id": 1025, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Telephone\") and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 1026, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Mitchell Mckee\" and transaction_type = 'payment' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') ) " }, { "id": 1027, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Danielle Garza\"" }, { "id": 1028, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Max Noble\" order by transaction_date limit 1" }, { "id": 1029, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 1030, "SQL": "select transaction_date 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 = \"Home care\" order by transaction_date asc limit 1 " }, { "id": 1031, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Breanna Smith\" and transaction_type = 'payment' and 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') ) " }, { "id": 1032, "SQL": "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,\"Baby formula and food\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 1033, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kevin Klein\" ) " }, { "id": 1034, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 1035, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Theresa Gonzalez\" ) " }, { "id": 1036, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 1037, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Laurie Christian' or vendor = 'Laurie Christian'" }, { "id": 1038, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Computer Repair and Maintainenance\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 1039, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Offering equity long/short \") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 1040, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Barbara Rice\" ) " }, { "id": 1041, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 1042, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) group by billing_city" }, { "id": 1043, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Rhonda Meyer\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 1044, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 1045, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brittany Freeman\" ) " }, { "id": 1046, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 1047, "SQL": "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,\"Promotional\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 1048, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 1049, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Rachel Wise\" ) " }, { "id": 1050, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 1051, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Rachel Montoya\" order by transaction_date limit 1" }, { "id": 1052, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Glenda Smith\" and transaction_type = 'invoice'" }, { "id": 1053, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Whitney Kennedy\"" }, { "id": 1054, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Nicholas King\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 1055, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Danielle Lee\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 1056, "SQL": "select transaction_date from master_txn_table where customers = \"Veronica Sanchez\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 1057, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 1058, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Meals and Entertainment\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 1059, "SQL": "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 eucalyptus oil\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 1060, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"John Mendoza\" order by transaction_date limit 1" }, { "id": 1061, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by billing_city" }, { "id": 1062, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Erica Anderson\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 1063, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 1064, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 1065, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 1066, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Drilling oil and gas wells\") 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') " }, { "id": 1067, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 1068, "SQL": "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,\"Constructing multifamily residential\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 1069, "SQL": "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,\"Chimney sweep services\") and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 1070, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 1071, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Providing courses in computer programming\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 1072, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Johnny Cox\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 1073, "SQL": "select transaction_id from master_txn_table where product_service = \"Steno class\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 1074, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Nancy Grant\" ) " }, { "id": 1075, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Kellie Diaz\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) )" }, { "id": 1076, "SQL": "select transaction_date 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 = \"Party favors\" order by transaction_date asc limit 1 " }, { "id": 1077, "SQL": "select transaction_date 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 = \"Providing other outdoor maintenance services\" order by transaction_date asc limit 1 " }, { "id": 1078, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Donna Hicks\" ) " }, { "id": 1079, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 1080, "SQL": "select transaction_date 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 = \"Event-driven\" order by transaction_date asc limit 1 " }, { "id": 1081, "SQL": "select transaction_id from master_txn_table where customers = \"Ana Williams\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 1082, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Larry Foster\"" }, { "id": 1083, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 1084, "SQL": "select sum(credit) from master_txn_table where product_service = \"Bars and Nightclubs\" and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 1085, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Application service provisioning\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 1086, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Monique Hamilton\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 1087, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 1088, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') and account_type in ('Expense','Other Expense') " }, { "id": 1089, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Olivia Mendez\" and transaction_type = 'payment' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') )" }, { "id": 1090, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by billing_city" }, { "id": 1091, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Mark Stanley\" ) " }, { "id": 1092, "SQL": "select transaction_id from master_txn_table where customers = \"Alison Sanders\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 1093, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") and account_type in ('Expense','Other Expense') " }, { "id": 1094, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 1095, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Kathleen Rivera\" order by transaction_date limit 1" }, { "id": 1096, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 1097, "SQL": "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,\"Packing services for goods\") and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 1098, "SQL": "select transaction_date 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 = \"Home-care\" order by transaction_date asc limit 1 " }, { "id": 1099, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Kimberly Nielsen\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date) AND date(current_date) )" }, { "id": 1100, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Brittany Rhodes\"" }, { "id": 1101, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 1102, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 1103, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 1104, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)group by product_service order by sum(credit) desc limit 1" }, { "id": 1105, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Alan Cardenas\"" }, { "id": 1106, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Cynthia Hinton\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') ) " }, { "id": 1107, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Angela Norris\" ) " }, { "id": 1108, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Craig Campos\" ) " }, { "id": 1109, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Angela Todd\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") ) " }, { "id": 1110, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Anthony Price\" ) " }, { "id": 1111, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jared Richardson\" ) " }, { "id": 1112, "SQL": "select sum(credit) from master_txn_table where product_service = \"--\" and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 1113, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Sandra Waters\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 1114, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 1115, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 1116, "SQL": "select transaction_date 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 = \"Metal ore\" order by transaction_date asc limit 1 " }, { "id": 1117, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Drew Wheeler\" ) " }, { "id": 1118, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Michael Schwartz\" ) " }, { "id": 1119, "SQL": "select transaction_id from master_txn_table where customers = \"Elizabeth Young\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 1120, "SQL": "select transaction_id from master_txn_table where customers = \"Joshua Dyer\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 1121, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Dakota Osborne\" and transaction_type = 'invoice'" }, { "id": 1122, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"David Lee\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 1123, "SQL": "select transaction_date 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 = \"Abandoned Infant\" order by transaction_date asc limit 1 " }, { "id": 1124, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 1125, "SQL": "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 = \"Patrick Carpenter\" and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 1126, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Zachary Pierce\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 1127, "SQL": "select transaction_id from master_txn_table where customers = \"Jonathan James\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 1128, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Mark Holt\" ) " }, { "id": 1129, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 1130, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Providing financing related to securities\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 1131, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"James Yang\" ) " }, { "id": 1132, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Steve Daniels\" ) " }, { "id": 1133, "SQL": "select sum(credit) from master_txn_table where product_service = \"Therapy\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 1134, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Job Expenses\") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 1135, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Sarah Hodges\" and transaction_type = 'invoice'" }, { "id": 1136, "SQL": "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,\"Hotels and motel services\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 1137, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 1138, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Mary Tyler\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 1139, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Haley Sampson\" ) " }, { "id": 1140, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 1141, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Dennis Kramer\"" }, { "id": 1142, "SQL": "select transaction_date from master_txn_table where customers = \"Jaime Hicks\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 1143, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Amy Moore MD\" and transaction_type = 'payment' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') ) " }, { "id": 1144, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Megan Massey\"" }, { "id": 1145, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 1146, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jennifer Richard\" ) " }, { "id": 1147, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') group by billing_city" }, { "id": 1148, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"John Austin\" and transaction_type = 'invoice'" }, { "id": 1149, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Erik Evans\" ) " }, { "id": 1150, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 1151, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Aaron Reeves\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 1152, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Rebecca Hernandez\" ) " }, { "id": 1153, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Coordinators\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 1154, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Dakota Fisher\" ) " }, { "id": 1155, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Sofas/sofa-sleepers\" " }, { "id": 1156, "SQL": "select transaction_id from master_txn_table where customers = \"Jennifer Middleton\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 1157, "SQL": "select transaction_date from master_txn_table where customers = \"Donna Vincent\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 1158, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 1159, "SQL": "select min(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 = \"Donald Wolfe\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 1160, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Raymond Cox\" ) " }, { "id": 1161, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) group by billing_city" }, { "id": 1162, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 1163, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"William Steele\" ) " }, { "id": 1164, "SQL": "select transaction_id from master_txn_table where product_service = \"Saddlery\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 1165, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Caitlin Cox\" ) " }, { "id": 1166, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 1167, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sean Trevino\" ) " }, { "id": 1168, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Andrew Chung\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) ) " }, { "id": 1169, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 1170, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Franklin Stout\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 1171, "SQL": "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,\"Adoption placement services\") and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 1172, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Kelsey Smith\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 1173, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Paul Costa\" order by transaction_date limit 1" }, { "id": 1174, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounting\") and vendor = \"Deborah Boyd\"" }, { "id": 1175, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') group by billing_city" }, { "id": 1176, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Elizabeth Rodriguez\" ) " }, { "id": 1177, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Michael Meyer\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) )" }, { "id": 1178, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Baby car seats\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 1179, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 1180, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 1181, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Katie Cunningham\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') ) " }, { "id": 1182, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') order by sum(debit) desc limit 1" }, { "id": 1183, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by billing_city" }, { "id": 1184, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Carol Smith\" and account_type in ('Expense','Other Expense') and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 1185, "SQL": "select sum(credit) from master_txn_table where product_service = \"Casings, Tubes and Rods\" and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 1186, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Nicholas Moore\"" }, { "id": 1187, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Medical services\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 1188, "SQL": "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,\"Basic office and secretarial skills training\") and 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') " }, { "id": 1189, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Erik Morgan\" ) " }, { "id": 1190, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 1191, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ryan Mcbride\" ) " }, { "id": 1192, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Stacey Roach\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') )" }, { "id": 1193, "SQL": "select transaction_date from master_txn_table where customers = \"Patrick Phillips\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 1194, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Billy Roberts MD\" ) " }, { "id": 1195, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 1196, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 1197, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jimmy Long\" order by transaction_date limit 1" }, { "id": 1198, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 1199, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Carl Reed\" order by transaction_date limit 1" }, { "id": 1200, "SQL": "select transaction_id from master_txn_table where product_service = \"Therapeutic\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 1201, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Amber Smith MD\" and transaction_type = 'payment' 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') ) " }, { "id": 1202, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Commissions & fees\") and vendor = \"Benjamin Osborn\"" }, { "id": 1203, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 1204, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Tonya Nicholson\"" }, { "id": 1205, "SQL": "select transaction_date from master_txn_table where customers = \"Jesse Harmon\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 1206, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Christopher Eaton\" ) " }, { "id": 1207, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 1208, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Michael Flores\" ) " }, { "id": 1209, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 1210, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 1211, "SQL": "select sum(credit) from master_txn_table where product_service = \"Environmental impact assessment\" 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') " }, { "id": 1212, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Phillip Johnson\" ) " }, { "id": 1213, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Gabriela Olson\" ) " }, { "id": 1214, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Jacob Salinas\" and account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 1215, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Amy Bartlett\" order by transaction_date limit 1" }, { "id": 1216, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"William Rivera\" ) " }, { "id": 1217, "SQL": "select transaction_date 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 = \"Life cycle asset management\" order by transaction_date asc limit 1 " }, { "id": 1218, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Holly Stephens\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') ) " }, { "id": 1219, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Accounts Payable (A/P)\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 1220, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Isaac Mitchell\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 1221, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Christopher Lyons\"" }, { "id": 1222, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 1223, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Kenneth Martinez\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 1224, "SQL": "select sum(credit) from master_txn_table where product_service = \"Recreational programs\" and 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') " }, { "id": 1225, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Taylor Molina\" ) " }, { "id": 1226, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 1227, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Valerie Roberson\"" }, { "id": 1228, "SQL": "select transaction_id from master_txn_table where product_service = \"Lemon oil\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 1229, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 1230, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Attire and accessories\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 1231, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Business process management\") and 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') " }, { "id": 1232, "SQL": "select transaction_date 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 = \"Acetylene\" order by transaction_date asc limit 1 " }, { "id": 1233, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Scott Norton\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 1234, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Benjamin Knight\" ) " }, { "id": 1235, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 1236, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Charles Holland\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 1237, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Construction management services\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 1238, "SQL": "select transaction_id from master_txn_table where customers = \"Carrie Wang\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 1239, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Permits\") and vendor = \"Michael Turner\"" }, { "id": 1240, "SQL": "select transaction_date from master_txn_table where customers = \"Timothy Barton\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 1241, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Thomas Alvarez\" ) " }, { "id": 1242, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 1243, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Marcus Singh\" ) " }, { "id": 1244, "SQL": "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 financial planning services\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 1245, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 1246, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Bicycle retailing\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 1247, "SQL": "select transaction_date from master_txn_table where customers = \"Daniel Cox\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 1248, "SQL": "select sum(credit) from master_txn_table where product_service = \"Macs\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 1249, "SQL": "select distinct transaction_id from master_txn_table where customers = \"John Figueroa\"" }, { "id": 1250, "SQL": "select transaction_id from master_txn_table where customers = \"Zachary Ramirez\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 1251, "SQL": "select avg(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 = \"Kyle Bernard\" and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 1252, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 1253, "SQL": "select sum(credit) from master_txn_table where product_service = \"Youth community\" and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 1254, "SQL": "select avg(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 = \"Keith Chavez\" and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 1255, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Alicia Reid\"" }, { "id": 1256, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ariel Myers\" ) " }, { "id": 1257, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Larry King\" order by transaction_date limit 1" }, { "id": 1258, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sean Mann\" ) " }, { "id": 1259, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 1260, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jason Bentley\" order by transaction_date limit 1" }, { "id": 1261, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') group by billing_city" }, { "id": 1262, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Shannon Scott\" ) " }, { "id": 1263, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jonathon Shea\" order by transaction_date limit 1" }, { "id": 1264, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Curtis Mclaughlin\" ) " }, { "id": 1265, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'James Hayden' or vendor = 'James Hayden'" }, { "id": 1266, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 1267, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 1268, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 1269, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Catherine Higgins\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) )" }, { "id": 1270, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Shawn Compton\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) )" }, { "id": 1271, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Ashley Lutz\" and account_type in ('Expense','Other Expense') and 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') " }, { "id": 1272, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 1273, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"James Mcdowell\" ) " }, { "id": 1274, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Curtis Adams\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 1275, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by billing_city" }, { "id": 1276, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') group by billing_city" }, { "id": 1277, "SQL": "select min(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 = \"James Reed\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 1278, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Levi Ortiz\" ) " }, { "id": 1279, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 1280, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Lawrence Garrett\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) ) " }, { "id": 1281, "SQL": "select transaction_date from master_txn_table where customers = \"Amy Schaefer\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 1282, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Latoya Garcia\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') ) " }, { "id": 1283, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Amanda Price\" ) " }, { "id": 1284, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Business services centers\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 1285, "SQL": "select sum(credit) from master_txn_table where product_service = \"PCs\" and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 1286, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 1287, "SQL": "select transaction_id from master_txn_table where customers = \"Craig Baker\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 1288, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Matthew Jones\"" }, { "id": 1289, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Pamela Anderson\" ) " }, { "id": 1290, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Taxes & Licenses\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 1291, "SQL": "select transaction_date 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 = \"Bangalow\" order by transaction_date asc limit 1 " }, { "id": 1292, "SQL": "select transaction_id from master_txn_table where product_service = \"Townhouses\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 1293, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Gina Howell\" ) " }, { "id": 1294, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Kristina Holmes\" and transaction_type = 'invoice'" }, { "id": 1295, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Margaret Burch\" ) " }, { "id": 1296, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by billing_city" }, { "id": 1297, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 1298, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 1299, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 1300, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Farrier services\") and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 1301, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Christina Harris\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) ) " }, { "id": 1302, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kendra Hunter\" ) " }, { "id": 1303, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 1304, "SQL": "select transaction_date from master_txn_table where customers = \"Steve Miles\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 1305, "SQL": "select sum(credit) from master_txn_table where product_service = \"Mailbox Rental\" and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 1306, "SQL": "select transaction_id from master_txn_table where product_service = \"Industrial manufacturing\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 1307, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Michelle Grant\" ) " }, { "id": 1308, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Tiffany Saunders\" order by transaction_date limit 1" }, { "id": 1309, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Loan Payable\") and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 1310, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by billing_city" }, { "id": 1311, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Dillon Vega\"" }, { "id": 1312, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 1313, "SQL": "select transaction_id from master_txn_table where customers = \"Jason Bowman\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 1314, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 1315, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Fees Billed\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 1316, "SQL": "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,\"food and beverage services\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 1317, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 1318, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 1319, "SQL": "select avg(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 = \"Jonathan Sanchez\" and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 1320, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Decks and Patios\") and vendor = \"Sue Nguyen\"" }, { "id": 1321, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 1322, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Recognition software for government and legal purposes\") and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 1323, "SQL": "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,\"Constructing bangalow\") and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 1324, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 1325, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jacob Porter\" ) " }, { "id": 1326, "SQL": "select product_service, 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 transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') group by product_service order by sum(credit) desc limit 1" }, { "id": 1327, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Adrian Johnson\" ) " }, { "id": 1328, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 1329, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 1330, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Chimney sweep services\" " }, { "id": 1331, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 1332, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Margaret Walker\"" }, { "id": 1333, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kimberly Ruiz\" ) " }, { "id": 1334, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Mary Becker\" ) " }, { "id": 1335, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Kimberly Ramos\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 1336, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) group by billing_city" }, { "id": 1337, "SQL": "select transaction_date 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 = \"Database management\" order by transaction_date asc limit 1 " }, { "id": 1338, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Donna Schmidt\" ) " }, { "id": 1339, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Wholesaling aeronautical equipment and supplies\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 1340, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Katie Cox\" order by transaction_date limit 1" }, { "id": 1341, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name 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 account_type in ('Expense','Other Expense') " }, { "id": 1342, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 1343, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Katrina Garcia\"" }, { "id": 1344, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Brandi Hoffman\"" }, { "id": 1345, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Roger Yang\" ) " }, { "id": 1346, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 1347, "SQL": "select transaction_id from master_txn_table where customers = \"Mark Burns\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 1348, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Coal exploration\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 1349, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 1350, "SQL": "select max(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 = \"Debra Ford\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 1351, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kelsey Henry\" ) " }, { "id": 1352, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Business process management\") and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 1353, "SQL": "select transaction_date from master_txn_table where customers = \"Susan Stanton\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 1354, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 1355, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Raymond Gallegos\" ) " }, { "id": 1356, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lisa Berger\" ) " }, { "id": 1357, "SQL": "select sum(credit) from master_txn_table where product_service = \"Inorganic Gases\" and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 1358, "SQL": "select avg(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 = \"Jessica Oconnell\" and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 1359, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Decks and Patios\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 1360, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Aaron Hughes\" order by transaction_date limit 1" }, { "id": 1361, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Becky Bolton\"" }, { "id": 1362, "SQL": "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,\"Nursing and health services\") and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 1363, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"John Cooper\"" }, { "id": 1364, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 1365, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 1366, "SQL": "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 = \"Leah Thomas\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 1367, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 1368, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 1369, "SQL": "select transaction_id from master_txn_table where customers = \"Lisa Olsen\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 1370, "SQL": "select transaction_date 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 = \"Voice & Speech Recognition\" order by transaction_date asc limit 1 " }, { "id": 1371, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Janice Le\"" }, { "id": 1372, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 1373, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Christine Charles\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 1374, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Maurice Harris\" ) " }, { "id": 1375, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 1376, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 1377, "SQL": "select transaction_date 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 = \"Bedroom\" order by transaction_date asc limit 1 " }, { "id": 1378, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jennifer Rodgers\" and transaction_type = 'invoice'" }, { "id": 1379, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Justin Munoz\" ) " }, { "id": 1380, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Traci Juarez\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') ) " }, { "id": 1381, "SQL": "select transaction_date from master_txn_table where customers = \"Joy Rivera\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 1382, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 1383, "SQL": "select transaction_id from master_txn_table where customers = \"Laurie Hall\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 1384, "SQL": "select min(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 = \"Sean Martinez\" and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 1385, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 1386, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Recognition software for the auto sector\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 1387, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Chelsey Murphy\"" }, { "id": 1388, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"William Kelley\" and transaction_type = 'invoice'" }, { "id": 1389, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Chris Reed\" order by transaction_date limit 1" }, { "id": 1390, "SQL": "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 = \"Cindy Griffith\" and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 1391, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by billing_city" }, { "id": 1392, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Deborah Graves\" ) " }, { "id": 1393, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"William Brewer\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 1394, "SQL": "select sum(credit) from master_txn_table where product_service = \"Strollers\" and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 1395, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 1396, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 1397, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Warren Marquez\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 1398, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Gail Rivera\" ) " }, { "id": 1399, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Elizabeth Powell\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 1400, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lisa Carter\" ) " }, { "id": 1401, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by billing_city" }, { "id": 1402, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Marie Yoder\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) )" }, { "id": 1403, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Kimberly Ferguson\" order by transaction_date limit 1" }, { "id": 1404, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 1405, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Steven Hodges\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 1406, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 1407, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Social activities\") and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 1408, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 1409, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Lisa Harris\" order by transaction_date limit 1" }, { "id": 1410, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Taxes & Licenses\") and vendor = \"Diana Esparza\"" }, { "id": 1411, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Tracey Evans\" ) " }, { "id": 1412, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Donald Burnett\"" }, { "id": 1413, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 1414, "SQL": "select transaction_date from master_txn_table where customers = \"Paul Thornton\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 1415, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Juan Kim\" ) " }, { "id": 1416, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Multi-strategy\" " }, { "id": 1417, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Theresa Hill\" ) " }, { "id": 1418, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Ricky Singleton\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 1419, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Utilities\") and vendor = \"Stephen Blair\"" }, { "id": 1420, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Sarah Montes\"" }, { "id": 1421, "SQL": "select min(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 = \"Antonio Wells\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 1422, "SQL": "select min(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 = \"Timothy Weaver\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 1423, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 1424, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Scott Lopez\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 1425, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sabrina Jacobs\" ) " }, { "id": 1426, "SQL": "select max(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 = \"Duane Baldwin\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 1427, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Insurance\") and vendor = \"Albert Leonard\"" }, { "id": 1428, "SQL": "select transaction_id from master_txn_table where customers = \"Brian Sellers\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 1429, "SQL": "select transaction_id from master_txn_table where product_service = \"Spearmint oil\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 1430, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Andrew Salinas' or vendor = 'Andrew Salinas'" }, { "id": 1431, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") and account_type in ('Expense','Other Expense') " }, { "id": 1432, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 1433, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Anna Roth\" ) " }, { "id": 1434, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Anthony Carroll\" ) " }, { "id": 1435, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Janet Thomas\" ) " }, { "id": 1436, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Donald Allen\" order by transaction_date limit 1" }, { "id": 1437, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Shearing services\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 1438, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 1439, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Lee Hernandez\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) )" }, { "id": 1440, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 1441, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Marc House\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) )" }, { "id": 1442, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Erin Foster\" ) " }, { "id": 1443, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 1444, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Nancy Schultz DDS\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') )" }, { "id": 1445, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Molly Reynolds\" ) " }, { "id": 1446, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 1447, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date) AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 1448, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Kenneth Norton' or vendor = 'Kenneth Norton'" }, { "id": 1449, "SQL": "select transaction_id from master_txn_table where product_service = \"Equity long bias\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 1450, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Catherine Nichols\" ) " }, { "id": 1451, "SQL": "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 construction activities\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 1452, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brian Decker\" ) " }, { "id": 1453, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Hunter Gates\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 1454, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") order by sum(debit) desc limit 1" }, { "id": 1455, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 1456, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Kevin Boyd\"" }, { "id": 1457, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Kristin Black\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 1458, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 1459, "SQL": "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 = \"Ashley Mccormick\" and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 1460, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Joshua Chase\" ) " }, { "id": 1461, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Marisa Sparks\" ) " }, { "id": 1462, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Bryan Allen\" ) " }, { "id": 1463, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Susan Orr\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 1464, "SQL": "select transaction_date from master_txn_table where customers = \"Lisa Vega\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 1465, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 1466, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Aaron Taylor\" ) " }, { "id": 1467, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"John Stewart\" ) " }, { "id": 1468, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"golf courses and country clubs\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 1469, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Annette Martinez\" ) " }, { "id": 1470, "SQL": "select transaction_id from master_txn_table where product_service = \"Nursing and health\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 1471, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Constructing townhouses\") 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') " }, { "id": 1472, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Bobby Carr\" order by transaction_date limit 1" }, { "id": 1473, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ashley Wright\" ) " }, { "id": 1474, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Lisa Gross\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 1475, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 1476, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sharon Matthews\" ) " }, { "id": 1477, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Abandoned infant assistance\") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 1478, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Chloe Fernandez\" ) " }, { "id": 1479, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Eileen Mitchell\" ) " }, { "id": 1480, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Dana Huff\" order by transaction_date limit 1" }, { "id": 1481, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 1482, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Phillip Potter' or vendor = 'Phillip Potter'" }, { "id": 1483, "SQL": "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,\"Web hosting\") and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 1484, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Leslie Hill\"" }, { "id": 1485, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 1486, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Craig Ryan' or vendor = 'Craig Ryan'" }, { "id": 1487, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 1488, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Tyler Mendez\" ) " }, { "id": 1489, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jody Mcgee\" ) " }, { "id": 1490, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Michelle Garrett\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 1491, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Noah Griffin\"" }, { "id": 1492, "SQL": "select transaction_date from master_txn_table where customers = \"Bobby Ramirez\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 1493, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 1494, "SQL": "select transaction_id from master_txn_table where product_service = \"LAN\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 1495, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') group by billing_city" }, { "id": 1496, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Danielle Montgomery\"" }, { "id": 1497, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Traveller accomodation\" " }, { "id": 1498, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Megan Kane\" ) " }, { "id": 1499, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 1500, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 1501, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jose Baker\" ) " }, { "id": 1502, "SQL": "select avg(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 = \"Paul Costa\" and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 1503, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Kenneth Chambers\" and transaction_type = 'invoice'" }, { "id": 1504, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Supplies\") and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 1505, "SQL": "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,\"Office Expenses\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 1506, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') and account_type in ('Expense','Other Expense') " }, { "id": 1507, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Joseph Lawrence\" order by transaction_date limit 1" }, { "id": 1508, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jon Hernandez\" ) " }, { "id": 1509, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Angela Collins\" ) " }, { "id": 1510, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jason Randolph\" order by transaction_date limit 1" }, { "id": 1511, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Equipment Rental\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 1512, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Acidizing and chemically treating wells\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 1513, "SQL": "select transaction_id from master_txn_table where product_service = \"Saddlery\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 1514, "SQL": "select transaction_date from master_txn_table where customers = \"Jennifer Barker\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 1515, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 1516, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Tiffany Cole\"" }, { "id": 1517, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 1518, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 1519, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Curtis Adams\"" }, { "id": 1520, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Luis Andrews\" order by transaction_date limit 1" }, { "id": 1521, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Carol Noble\" ) " }, { "id": 1522, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Computer software and software application training\") and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 1523, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Willie Hodge\" order by transaction_date limit 1" }, { "id": 1524, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jay Montgomery\" order by transaction_date limit 1" }, { "id": 1525, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 1526, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 1527, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 1528, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Holly Dyer\" and transaction_type = 'payment' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') ) " }, { "id": 1529, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brian Scott\" ) " }, { "id": 1530, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Heidi Lewis\" ) " }, { "id": 1531, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 1532, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 1533, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Mary Willis\" ) " }, { "id": 1534, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Maintenance and repair work\") and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 1535, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Railcar rental or leasing\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 1536, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 1537, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 1538, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 1539, "SQL": "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,\"Child abuse prevention services\") and 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') " }, { "id": 1540, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brian Stevens\" ) " }, { "id": 1541, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Telephone\") and vendor = \"Kevin Patterson\"" }, { "id": 1542, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Development of software products for automobiles\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 1543, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jennifer Anderson\" order by transaction_date limit 1" }, { "id": 1544, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Stephen Sexton\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 1545, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Angela Gutierrez\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 1546, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'James Randall' or vendor = 'James Randall'" }, { "id": 1547, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Karen Bowman\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 1548, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Dance\" " }, { "id": 1549, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Carlos Warner\" ) " }, { "id": 1550, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Raymond Diaz\"" }, { "id": 1551, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 1552, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 1553, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 1554, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Amanda Hanson\"" }, { "id": 1555, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Rachael Strickland\" ) " }, { "id": 1556, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 1557, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) group by billing_city" }, { "id": 1558, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Megan Combs\" ) " }, { "id": 1559, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Dominique Russell\" and transaction_type = 'invoice'" }, { "id": 1560, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Eric Harris\"" }, { "id": 1561, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Gary Flores\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 1562, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Sarah Webb\" and transaction_type = 'invoice'" }, { "id": 1563, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 1564, "SQL": "select transaction_date 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 = \"Postal\" order by transaction_date asc limit 1 " }, { "id": 1565, "SQL": "select transaction_date from master_txn_table where customers = \"Brittany Santiago\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 1566, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 1567, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Meal services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 1568, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 1569, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Rebecca Cole\" ) " }, { "id": 1570, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Private parcel mailing services\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 1571, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 1572, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 1573, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Christopher Reid\" order by transaction_date limit 1" }, { "id": 1574, "SQL": "select avg(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 = \"Rodney Garcia\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 1575, "SQL": "select max(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 = \"Lynn Massey\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 1576, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Edward Wood\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') ) " }, { "id": 1577, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jennifer Daugherty\" ) " }, { "id": 1578, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jennifer Reese\"" }, { "id": 1579, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Shannon Grant\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') )" }, { "id": 1580, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') group by billing_city" }, { "id": 1581, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ricky Soto\" ) " }, { "id": 1582, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Margaret Contreras\" ) " }, { "id": 1583, "SQL": "select transaction_id from master_txn_table where product_service = \"Application Hosting\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 1584, "SQL": "select transaction_date 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 = \"Drinking and Special Food\" order by transaction_date asc limit 1 " }, { "id": 1585, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Gary Lopez\" ) " }, { "id": 1586, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 1587, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 1588, "SQL": "select transaction_id from master_txn_table where customers = \"Tanya Mendoza\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 1589, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Alex Lee\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') ) " }, { "id": 1590, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Carl Grant\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 1591, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"John Castillo\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 1592, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Gina Key\" order by transaction_date limit 1" }, { "id": 1593, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Promotional\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 1594, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 1595, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 1596, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 1597, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Brandi Hale MD\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 1598, "SQL": "select avg(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 = \"Amy Warren\" and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 1599, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 1600, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brooke Sherman\" ) " }, { "id": 1601, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Alicia Yu\" order by transaction_date limit 1" }, { "id": 1602, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Teresa Neal\" ) " }, { "id": 1603, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 1604, "SQL": "select transaction_date from master_txn_table where customers = \"Thomas Barnes\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 1605, "SQL": "select transaction_date 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 = \"Transportation\" order by transaction_date asc limit 1 " }, { "id": 1606, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Uncategorized Income\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 1607, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Providing courses in computer programming\") and 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') " }, { "id": 1608, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Billy Alvarez\" ) " }, { "id": 1609, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 1610, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 1611, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Fluorocarbon gases\" " }, { "id": 1612, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Diane Douglas\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) ) " }, { "id": 1613, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Doris Blake\" order by transaction_date limit 1" }, { "id": 1614, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Thomas Gomez\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) ) " }, { "id": 1615, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Counseling\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 1616, "SQL": "select transaction_date from master_txn_table where customers = \"Steven Jackson\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 1617, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 1618, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Eric Norman\" ) " }, { "id": 1619, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Michael Jefferson' or vendor = 'Michael Jefferson'" }, { "id": 1620, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') and account_type in ('Expense','Other Expense') " }, { "id": 1621, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 1622, "SQL": "select sum(credit) from master_txn_table where product_service = \"Dietary and Nutritional\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 1623, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Christopher Cain\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) ) " }, { "id": 1624, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 1625, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Connie Williams\" ) " }, { "id": 1626, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"John Boyd\" order by transaction_date limit 1" }, { "id": 1627, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Susan Myers\" ) " }, { "id": 1628, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date) AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 1629, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Insurance\") and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 1630, "SQL": "select transaction_id from master_txn_table where customers = \"Heather Choi\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 1631, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 1632, "SQL": "select transaction_date from master_txn_table where customers = \"Anthony Randall\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 1633, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Benjamin Craig\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) ) " }, { "id": 1634, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 1635, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 1636, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Job Expenses\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 1637, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Paula Cooper\" ) " }, { "id": 1638, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Mercedes Cowan\" ) " }, { "id": 1639, "SQL": "select transaction_date from master_txn_table where customers = \"Craig Hines\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 1640, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Dana Peters\" ) " }, { "id": 1641, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 1642, "SQL": "select transaction_id from master_txn_table where product_service = \"Locomotives\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 1643, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Theresa Santiago\"" }, { "id": 1644, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Tony Adkins\" ) " }, { "id": 1645, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 1646, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Unapplied Cash Payment Income\") and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 1647, "SQL": "select transaction_date from master_txn_table where customers = \"Miss Michelle Parker\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 1648, "SQL": "select transaction_date from master_txn_table where customers = \"Jordan Horn\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 1649, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Erin Wilson\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 1650, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Michael Allen\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 1651, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jamie Zavala\" and transaction_type = 'invoice'" }, { "id": 1652, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Flowers\") 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') " }, { "id": 1653, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 1654, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 1655, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 1656, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Billy Whitehead' or vendor = 'Billy Whitehead'" }, { "id": 1657, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 1658, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Non-musical performances\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 1659, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Derrick Hernandez\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') ) " }, { "id": 1660, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sarah Castillo\" ) " }, { "id": 1661, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 1662, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Javier Reyes\" ) " }, { "id": 1663, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Reprographic services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 1664, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' 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') " }, { "id": 1665, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Diving equipment retailing\") and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 1666, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 1667, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 1668, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Computer software and software application training\") and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 1669, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Brian Powell\" and transaction_type = 'invoice'" }, { "id": 1670, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jacob Phelps\" order by transaction_date limit 1" }, { "id": 1671, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Christopher Wood\" and account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 1672, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Daryl Garcia\" ) " }, { "id": 1673, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by billing_city" }, { "id": 1674, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Emily Ward\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) )" }, { "id": 1675, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Nicholas Lowe' or vendor = 'Nicholas Lowe'" }, { "id": 1676, "SQL": "select transaction_date 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 = \"Fixed income\" order by transaction_date asc limit 1 " }, { "id": 1677, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 1678, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Tamara Fields\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) ) " }, { "id": 1679, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Angela Hess\" ) " }, { "id": 1680, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Emily Jacobs\" order by transaction_date limit 1" }, { "id": 1681, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Providing financing related to securities\") and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 1682, "SQL": "select transaction_date 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 = \"Townhouses\" order by transaction_date asc limit 1 " }, { "id": 1683, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 1684, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") group by billing_city" }, { "id": 1685, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Lindsay Nelson\" order by transaction_date limit 1" }, { "id": 1686, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 1687, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Other food services\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 1688, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Benjamin Thompson\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 1689, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Patrick Carter\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 1690, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Susan Allen\"" }, { "id": 1691, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 1692, "SQL": "select transaction_date from master_txn_table where customers = \"James Parker\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 1693, "SQL": "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 nonnuclear power generation\") and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 1694, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Application service provider services\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 1695, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") group by product_service order by sum(credit) desc limit 1" }, { "id": 1696, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Christopher Harmon\" and account_type in ('Expense','Other Expense') 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') " }, { "id": 1697, "SQL": "select transaction_id from master_txn_table where product_service = \"Grapefruit oil\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 1698, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 1699, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Michael Miller\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 1700, "SQL": "select transaction_date 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 = \"Life cycle asset management\" order by transaction_date asc limit 1 " }, { "id": 1701, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Holly Hale\" ) " }, { "id": 1702, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Kevin Rollins\" and transaction_type = 'invoice'" }, { "id": 1703, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 1704, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Marc Miles\" ) " }, { "id": 1705, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 1706, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Beth Davis\" ) " }, { "id": 1707, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jeanette Bryan\" ) " }, { "id": 1708, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"William Cole\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") ) " }, { "id": 1709, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 1710, "SQL": "select transaction_date from master_txn_table where customers = \"Sarah Perry\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 1711, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Joann Melendez\" ) " }, { "id": 1712, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jose Franklin\" and transaction_type = 'invoice'" }, { "id": 1713, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Kenneth Barnes\" order by transaction_date limit 1" }, { "id": 1714, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 1715, "SQL": "select sum(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Money Management\" " }, { "id": 1716, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 1717, "SQL": "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,\"Local area network management training\") and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 1718, "SQL": "select transaction_date 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 = \"Quality accreditation\" order by transaction_date asc limit 1 " }, { "id": 1719, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Elizabeth Bailey\" order by transaction_date limit 1" }, { "id": 1720, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 1721, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Joanne Parker\" ) " }, { "id": 1722, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 1723, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Fees Billed\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 1724, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Mia Bryant\"" }, { "id": 1725, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Roger Oconnor\"" }, { "id": 1726, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 1727, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Randall Shelton\" ) " }, { "id": 1728, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 1729, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 1730, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Development of software products for automobiles\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 1731, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Tyler Mcmahon\"" }, { "id": 1732, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Grace Nunez\" ) " }, { "id": 1733, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Eric Davis\" and transaction_type = 'payment' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') ) " }, { "id": 1734, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Juan Cervantes\" order by transaction_date limit 1" }, { "id": 1735, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Sean Harris\"" }, { "id": 1736, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Amy Reed\" ) " }, { "id": 1737, "SQL": "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,\"Offering distressed securities funds\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 1738, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Motorbike \") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 1739, "SQL": "select transaction_date from master_txn_table where customers = \"Scott Vaughn PhD\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 1740, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kristen Robinson\" ) " }, { "id": 1741, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Dylan Johns\" ) " }, { "id": 1742, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 1743, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Thomas Richards\" ) " }, { "id": 1744, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 1745, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 1746, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Equipment Rental\") and vendor = \"Loretta King\"" }, { "id": 1747, "SQL": "select transaction_date 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 = \"Gifts and grants\" order by transaction_date asc limit 1 " }, { "id": 1748, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 1749, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 1750, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Equipment Repairs\") and vendor = \"Whitney Gardner\"" }, { "id": 1751, "SQL": "select transaction_date from master_txn_table where customers = \"Dustin Miller\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 1752, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Lindsey Weaver\" order by transaction_date limit 1" }, { "id": 1753, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Tina Barrett\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) )" }, { "id": 1754, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Taylor Rodriguez\"" }, { "id": 1755, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 1756, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Christina Young\" ) " }, { "id": 1757, "SQL": "select transaction_date from master_txn_table where customers = \"Christian Payne\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 1758, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 1759, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Paul Grant\" and transaction_type = 'invoice'" }, { "id": 1760, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Cathy Lewis\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') ) " }, { "id": 1761, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 1762, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 1763, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by billing_city" }, { "id": 1764, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Heather Franco\" ) " }, { "id": 1765, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Denise Carroll\" ) " }, { "id": 1766, "SQL": "select transaction_date 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 = \"Aircraft\" order by transaction_date asc limit 1 " }, { "id": 1767, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Melinda Browning' or vendor = 'Melinda Browning'" }, { "id": 1768, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Katelyn Liu MD\" ) " }, { "id": 1769, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Maria Hansen' or vendor = 'Maria Hansen'" }, { "id": 1770, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Fuel\") and vendor = \"Melissa Barnes\"" }, { "id": 1771, "SQL": "select transaction_id from master_txn_table where customers = \"Tina Salazar\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 1772, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Scott Robinson\" order by transaction_date limit 1" }, { "id": 1773, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Martin Campbell\" order by transaction_date limit 1" }, { "id": 1774, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Wanda Brooks\" and transaction_type = 'invoice'" }, { "id": 1775, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Photocopying services\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 1776, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kyle Watson\" ) " }, { "id": 1777, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Child guidance services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 1778, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 1779, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Natalie Smith\" ) " }, { "id": 1780, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 1781, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Invitations\" " }, { "id": 1782, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 1783, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Carla Phillips\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 1784, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Scott Miller\" ) " }, { "id": 1785, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Suzanne Pham\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 1786, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Monica Wang\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) ) " }, { "id": 1787, "SQL": "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,\"Chimney sweep services\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 1788, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Isaac Martinez\"" }, { "id": 1789, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 1790, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Terri Snyder DVM\" ) " }, { "id": 1791, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 1792, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Crystal Church\" ) " }, { "id": 1793, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Jay Smith\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) ) " }, { "id": 1794, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 1795, "SQL": "select transaction_date from master_txn_table where customers = \"Jacqueline Garcia\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 1796, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Maintenance and Repair\") and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 1797, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 1798, "SQL": "select transaction_date from master_txn_table where customers = \"Sarah Ballard\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 1799, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Tara Gonzalez\" ) " }, { "id": 1800, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Selena Wolf\" and transaction_type = 'invoice'" }, { "id": 1801, "SQL": "select max(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 = \"Margaret Young\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 1802, "SQL": "select transaction_id from master_txn_table where customers = \"Trevor Kent\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 1803, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Krista Clark\" ) " }, { "id": 1804, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Phillip Molina\" ) " }, { "id": 1805, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by billing_city" }, { "id": 1806, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 1807, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Joshua Lee\" ) " }, { "id": 1808, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Reginald Greene\" ) " }, { "id": 1809, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Brianna Wood\" order by transaction_date limit 1" }, { "id": 1810, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 1811, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Debbie Dalton\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") )" }, { "id": 1812, "SQL": "select sum(credit) from master_txn_table where product_service = \"Motorbike\" and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 1813, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 1814, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name 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 account_type in ('Expense','Other Expense') " }, { "id": 1815, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 1816, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 1817, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 1818, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lance Haley\" ) " }, { "id": 1819, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Julia Morris\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 1820, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 1821, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Andrea Mcclure\"" }, { "id": 1822, "SQL": "select transaction_date from master_txn_table where customers = \"Frances Frank\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 1823, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Brett Price\"" }, { "id": 1824, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Brandon Hernandez\" and transaction_type = 'invoice'" }, { "id": 1825, "SQL": "select sum(credit) from master_txn_table where product_service = \"Drinking and Special Food\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 1826, "SQL": "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,\"Railcar rental or leasing\") and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 1827, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') group by billing_city" }, { "id": 1828, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Rickey Valdez\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 1829, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') and account_type in ('Expense','Other Expense') " }, { "id": 1830, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Brenda Mack' or vendor = 'Brenda Mack'" }, { "id": 1831, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jeffrey Henderson\" ) " }, { "id": 1832, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Amanda Mendoza DDS\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') )" }, { "id": 1833, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Mark Duke\" and transaction_type = 'payment' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') ) " }, { "id": 1834, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Process management\") and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 1835, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Billy Lopez\" order by transaction_date limit 1" }, { "id": 1836, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Towboat and tugboat rental or leasing\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 1837, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Eric Brooks\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 1838, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jennifer Ford\"" }, { "id": 1839, "SQL": "select transaction_id from master_txn_table where customers = \"Charles Mcguire\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 1840, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 1841, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 1842, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Steven West\" and transaction_type = 'invoice'" }, { "id": 1843, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Mathew Serrano\" ) " }, { "id": 1844, "SQL": "select transaction_id from master_txn_table where product_service = \"Acetylene\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 1845, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') group by billing_city" }, { "id": 1846, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jessica Eaton\" order by transaction_date limit 1" }, { "id": 1847, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 1848, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 1849, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jeffrey Cox\" ) " }, { "id": 1850, "SQL": "select transaction_id from master_txn_table where product_service = \"Foster Care\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 1851, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Joseph Nichols' or vendor = 'Joseph Nichols'" }, { "id": 1852, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 1853, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Miss Marcia Scott\" ) " }, { "id": 1854, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Manufacturing industrial organic gases\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 1855, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Brett Barnes\" order by transaction_date limit 1" }, { "id": 1856, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 1857, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Computer Repair and Maintainenance\") 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') " }, { "id": 1858, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 1859, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Logan Perkins\" ) " }, { "id": 1860, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Matthew Lewis\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) ) " }, { "id": 1861, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 1862, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Alex Green\" and transaction_type = 'invoice'" }, { "id": 1863, "SQL": "select product_service, 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 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') group by product_service order by sum(credit) desc limit 1" }, { "id": 1864, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Carolyn Summers\" ) " }, { "id": 1865, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Repair & Maintenance (deleted)\") and vendor = \"Matthew Diaz\"" }, { "id": 1866, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Data storage management\" " }, { "id": 1867, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Carla Rivera\" order by transaction_date limit 1" }, { "id": 1868, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Leroy Meadows\" ) " }, { "id": 1869, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"James Ramos\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 1870, "SQL": "select product_service, 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 transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') group by product_service order by sum(credit) desc limit 1" }, { "id": 1871, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Daniel Benton\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 1872, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 1873, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Event-driven\" " }, { "id": 1874, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Offering equity long/short \") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 1875, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 1876, "SQL": "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,\"Local area network management training\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 1877, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 1878, "SQL": "select transaction_date from master_txn_table where customers = \"Miss Kathy Green\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 1879, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Matthew Roth\" ) " }, { "id": 1880, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 1881, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 1882, "SQL": "select transaction_id from master_txn_table where product_service = \"Self-help programs\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 1883, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Wholesaling boats (except pleasure)\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 1884, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Jason Stewart\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 1885, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 1886, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 1887, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 1888, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 1889, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 1890, "SQL": "select transaction_date from master_txn_table where customers = \"Sean Mullins\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 1891, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Providing financial planning services\") and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 1892, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brandon Mendez\" ) " }, { "id": 1893, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Carl Meyers\" ) " }, { "id": 1894, "SQL": "select product_service, 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 transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') group by product_service order by sum(credit) desc limit 1" }, { "id": 1895, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Richard Fernandez\"" }, { "id": 1896, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Melissa Wilson\" ) " }, { "id": 1897, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Belinda Thomas\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') ) " }, { "id": 1898, "SQL": "select min(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 = \"Crystal Roman\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 1899, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Invitations\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 1900, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 1901, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Madeline Massey\" and transaction_type = 'invoice'" }, { "id": 1902, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Cody Stout\" ) " }, { "id": 1903, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Retailing formal dining furniture\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 1904, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Spraying services\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 1905, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Camping and Parking\" " }, { "id": 1906, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Erin Martin\" ) " }, { "id": 1907, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Shane Carter\" order by transaction_date limit 1" }, { "id": 1908, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 1909, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Catherine Reyes\" ) " }, { "id": 1910, "SQL": "select product_service, 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 transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') group by product_service order by sum(credit) desc limit 1" }, { "id": 1911, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Nicole Wilson\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 1912, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Thomas Floyd\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 1913, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 1914, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 1915, "SQL": "select transaction_id from master_txn_table where customers = \"Carol Davidson\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 1916, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Taylor Bradley\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') ) " }, { "id": 1917, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 1918, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Kevin Hunter\"" }, { "id": 1919, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"James Fitzpatrick\" ) " }, { "id": 1920, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Feasibility studies\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 1921, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 1922, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date) AND date(current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 1923, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brent Rodriguez\" ) " }, { "id": 1924, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Samuel Guzman\" ) " }, { "id": 1925, "SQL": "select transaction_id from master_txn_table where customers = \"Cody Gonzalez\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 1926, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Regina Young\" order by transaction_date limit 1" }, { "id": 1927, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jacob Ford\" order by transaction_date limit 1" }, { "id": 1928, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Mark Suarez\" ) " }, { "id": 1929, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"David Freeman\" ) " }, { "id": 1930, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Henry Lewis\" order by transaction_date limit 1" }, { "id": 1931, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Andrea Crawford\" and transaction_type = 'payment' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') )" }, { "id": 1932, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 1933, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Troy Mendoza\" ) " }, { "id": 1934, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Antonio Gutierrez\" ) " }, { "id": 1935, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Anthony Stewart\" ) " }, { "id": 1936, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Renee Ortiz\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date) AND date(current_date) )" }, { "id": 1937, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Elizabeth Ward\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) ) " }, { "id": 1938, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Joshua Ferguson II\"" }, { "id": 1939, "SQL": "select transaction_id from master_txn_table where customers = \"Christina Fox\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 1940, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brett Rasmussen\" ) " }, { "id": 1941, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 1942, "SQL": "select transaction_id from master_txn_table where product_service = \"Social\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 1943, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Constructing apartment complexes\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 1944, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"James Lewis\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 1945, "SQL": "select transaction_date 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 = \"Bowling\" order by transaction_date asc limit 1 " }, { "id": 1946, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kyle Dickerson\" ) " }, { "id": 1947, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 1948, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Melissa Harris\" ) " }, { "id": 1949, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Johnathan Harvey\" order by transaction_date limit 1" }, { "id": 1950, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Providing courses in computer programming\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 1951, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Mary Fuller\" ) " }, { "id": 1952, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Daniel Olson\" and transaction_type = 'invoice'" }, { "id": 1953, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jesse Day\"" }, { "id": 1954, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Stephanie Rhodes\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 1955, "SQL": "select transaction_id from master_txn_table where customers = \"Tammy Cunningham\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 1956, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Jennifer Smith\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 1957, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 1958, "SQL": "select transaction_id from master_txn_table where product_service = \"Senior-care\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 1959, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Mckenzie Hawkins\" ) " }, { "id": 1960, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 1961, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 1962, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Ryan Mullins\" order by transaction_date limit 1" }, { "id": 1963, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Stephen Fitzgerald\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 1964, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 1965, "SQL": "select transaction_id from master_txn_table where customers = \"James Potter\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 1966, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") order by sum(debit) desc limit 1" }, { "id": 1967, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Full-service restaurants\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 1968, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Justin Beck\" order by transaction_date limit 1" }, { "id": 1969, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by billing_city" }, { "id": 1970, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 1971, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') order by sum(debit) desc limit 1" }, { "id": 1972, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 1973, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 1974, "SQL": "select product_service, 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 transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') group by product_service order by sum(credit) desc limit 1" }, { "id": 1975, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 1976, "SQL": "select transaction_id from master_txn_table where product_service = \"Aircraft Engines\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 1977, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Katherine Hill\" and account_type in ('Expense','Other Expense') and 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') " }, { "id": 1978, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Matthew Underwood\" and transaction_type = 'invoice'" }, { "id": 1979, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') group by billing_city" }, { "id": 1980, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 1981, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 1982, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 1983, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Barbara Sanchez\"" }, { "id": 1984, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Rebecca Edwards\"" }, { "id": 1985, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Heidi Nichols\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 1986, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 1987, "SQL": "select sum(credit) from master_txn_table where product_service = \"Home office\" and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 1988, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 1989, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Furniture\" " }, { "id": 1990, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 1991, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Austin Allen MD\" and transaction_type = 'invoice'" }, { "id": 1992, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Austin Cooper\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') )" }, { "id": 1993, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 1994, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kristie Baker\" ) " }, { "id": 1995, "SQL": "select transaction_date from master_txn_table where customers = \"Michele Reyes\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 1996, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jennifer Chapman\" ) " }, { "id": 1997, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 1998, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Aaron Schneider\" order by transaction_date limit 1" }, { "id": 1999, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') group by billing_city" }, { "id": 2000, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Kristina Jones\"" }, { "id": 2001, "SQL": "select transaction_date 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 = \"Hydrogen\" order by transaction_date asc limit 1 " }, { "id": 2002, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 2003, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lauren Jackson\" ) " }, { "id": 2004, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Hannah Davis\"" }, { "id": 2005, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Daniel Cunningham\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 2006, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 2007, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Database management\") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 2008, "SQL": "select transaction_id from master_txn_table where product_service = \"Computer Programming\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 2009, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Cory Crosby\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date) AND date(current_date) ) " }, { "id": 2010, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Blake Frazier\"" }, { "id": 2011, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 2012, "SQL": "select transaction_date from master_txn_table where customers = \"Curtis Henry\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 2013, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Forestry and logging machinery and equipment rental or leasing\") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 2014, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') group by billing_city" }, { "id": 2015, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'John Powers' or vendor = 'John Powers'" }, { "id": 2016, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Social activities\") and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 2017, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') 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') order by sum(debit) desc limit 1" }, { "id": 2018, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 2019, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Repair & Maintenance (deleted)\") and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 2020, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Daniel Mora\" ) " }, { "id": 2021, "SQL": "select transaction_date from master_txn_table where customers = \"Erin Long\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 2022, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Design income\") and 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') " }, { "id": 2023, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jennifer Elliott\" ) " }, { "id": 2024, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 2025, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Ryan Parrish\"" }, { "id": 2026, "SQL": "select transaction_id from master_txn_table where product_service = \"Motorbike\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 2027, "SQL": "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 = \"Heather Wilson\" and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 2028, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Charles Green\" ) " }, { "id": 2029, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Dominique Carr\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 2030, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Pamela Sherman\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 2031, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Livestock health services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 2032, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') group by billing_city" }, { "id": 2033, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') group by product_service order by sum(credit) desc limit 1" }, { "id": 2034, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') group by billing_city" }, { "id": 2035, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Marcus Martinez\" ) " }, { "id": 2036, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Joseph Warren\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) )" }, { "id": 2037, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 2038, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 2039, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Tim Johnson\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 2040, "SQL": "select transaction_date from master_txn_table where customers = \"Devon Richardson\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 2041, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") order by sum(debit) desc limit 1" }, { "id": 2042, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Deanna Lopez\" ) " }, { "id": 2043, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Matthew Simmons\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 2044, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 2045, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Frank Trevino\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date) AND date(current_date) ) " }, { "id": 2046, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Mia Gutierrez\" ) " }, { "id": 2047, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Toni Sanders\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') ) " }, { "id": 2048, "SQL": "select transaction_id from master_txn_table where product_service = \"Bedding\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 2049, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Stacy Martin\" order by transaction_date limit 1" }, { "id": 2050, "SQL": "select transaction_date from master_txn_table where customers = \"Marc Brown\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 2051, "SQL": "select transaction_id from master_txn_table where customers = \"Andre Riley\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 2052, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Livestock health services\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 2053, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Rail transportation support and other products\") and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 2054, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Jason Pearson\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 2055, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Jason Savage' or vendor = 'Jason Savage'" }, { "id": 2056, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Julie Fox\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) ) " }, { "id": 2057, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 2058, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Dalton Clarke\" ) " }, { "id": 2059, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Alicia Reyes' or vendor = 'Alicia Reyes'" }, { "id": 2060, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Amber Lewis\" and transaction_type = 'invoice'" }, { "id": 2061, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Recognition software for government and legal purposes\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 2062, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 2063, "SQL": "select avg(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 = \"Cassandra Ramirez\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 2064, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Philip Taylor\" ) " }, { "id": 2065, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where 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') and account_type in ('Expense','Other Expense') " }, { "id": 2066, "SQL": "select transaction_date from master_txn_table where customers = \"Janet Robinson\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 2067, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Tony Lopez\" order by transaction_date limit 1" }, { "id": 2068, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 2069, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Sandra Peterson\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 2070, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Hydroelectric power generation\") 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') " }, { "id": 2071, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Julie Hall DVM\" and account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 2072, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Brian Hawkins\" order by transaction_date limit 1" }, { "id": 2073, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Michael Tapia\" ) " }, { "id": 2074, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Bars and Nightclubs\" " }, { "id": 2075, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 2076, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Andrew Scott\"" }, { "id": 2077, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 2078, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Nancy Perez' or vendor = 'Nancy Perez'" }, { "id": 2079, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Ariel Winters\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') ) " }, { "id": 2080, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 2081, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Meghan Moore\" ) " }, { "id": 2082, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Laura Miller' or vendor = 'Laura Miller'" }, { "id": 2083, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"James Lynn\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 2084, "SQL": "select transaction_id from master_txn_table where product_service = \"Event-driven\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 2085, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Paul Dean\" ) " }, { "id": 2086, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jessica Bowen\"" }, { "id": 2087, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') order by sum(debit) desc limit 1" }, { "id": 2088, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 2089, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Dues & Subscriptions\") and vendor = \"Sandra Waters\"" }, { "id": 2090, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 2091, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Angel Jordan\"" }, { "id": 2092, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Golf equipment and supply retailing\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 2093, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Melissa Hart' or vendor = 'Melissa Hart'" }, { "id": 2094, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 2095, "SQL": "select max(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 = \"Rebecca Patel\" and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 2096, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 2097, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Victoria Moore\"" }, { "id": 2098, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 2099, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Fees Billed\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 2100, "SQL": "select sum(credit) from master_txn_table where product_service = \"Meal\" and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 2101, "SQL": "select transaction_date 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 = \"Parking lot and driveway washing\" order by transaction_date asc limit 1 " }, { "id": 2102, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 2103, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 2104, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Jason Riley' or vendor = 'Jason Riley'" }, { "id": 2105, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Yvonne Hickman\"" }, { "id": 2106, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brandon Walters\" ) " }, { "id": 2107, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 2108, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kristen Moreno\" ) " }, { "id": 2109, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') group by billing_city" }, { "id": 2110, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Rebecca Miller\" ) " }, { "id": 2111, "SQL": "select transaction_date from master_txn_table where customers = \"Teresa Murillo\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 2112, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') 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') group by billing_city" }, { "id": 2113, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Heather Contreras\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date) AND date(current_date) ) " }, { "id": 2114, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Steven Reynolds\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 2115, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 2116, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Samantha Rose\" and transaction_type = 'payment' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') )" }, { "id": 2117, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 2118, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 2119, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 2120, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Daniel Martin\" ) " }, { "id": 2121, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Nancy Parrish\" ) " }, { "id": 2122, "SQL": "select transaction_date from master_txn_table where customers = \"Samantha Garcia\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 2123, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Wanda Frazier\" ) " }, { "id": 2124, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Justin Jefferson\" and transaction_type = 'invoice'" }, { "id": 2125, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Amy Sutton\" order by transaction_date limit 1" }, { "id": 2126, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Business services centers\") and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 2127, "SQL": "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,\"Baby accessories\") and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 2128, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sabrina Bates\" ) " }, { "id": 2129, "SQL": "select transaction_date from master_txn_table where customers = \"Eric Boyd\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 2130, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Amy Ferguson\" and transaction_type = 'invoice'" }, { "id": 2131, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 2132, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Wholesaling navigational instruments (except electronic)\") and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 2133, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') and account_type in ('Expense','Other Expense') " }, { "id": 2134, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Providing support services for financial\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 2135, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 2136, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Randy Bray\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 2137, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 2138, "SQL": "select transaction_date from master_txn_table where customers = \"Karl Adams\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 2139, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 2140, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Transportation services\") and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 2141, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Victoria Levy\" and transaction_type = 'invoice'" }, { "id": 2142, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Data storage and management services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 2143, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Barbara Hayes\" ) " }, { "id": 2144, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 2145, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 2146, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 2147, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Michelle Daniel' or vendor = 'Michelle Daniel'" }, { "id": 2148, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Daniel Jackson\" order by transaction_date limit 1" }, { "id": 2149, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Michael Decker\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') ) " }, { "id": 2150, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Evelyn Fletcher\" order by transaction_date limit 1" }, { "id": 2151, "SQL": "select transaction_date 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 = \"Securities\" order by transaction_date asc limit 1 " }, { "id": 2152, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 2153, "SQL": "select transaction_date 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 = \"Symphony\" order by transaction_date asc limit 1 " }, { "id": 2154, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Mark Smith\" ) " }, { "id": 2155, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Crystal Cantrell\" ) " }, { "id": 2156, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Kathryn Collins' or vendor = 'Kathryn Collins'" }, { "id": 2157, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Aaron Mann\" ) " }, { "id": 2158, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 2159, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Andrew Rogers\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 2160, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Kimberly Watts\" order by transaction_date limit 1" }, { "id": 2161, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Dana Goodman\" order by transaction_date limit 1" }, { "id": 2162, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Rebecca Osborne\" ) " }, { "id": 2163, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 2164, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Computer operation training\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 2165, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jasmine Mccormick\" order by transaction_date limit 1" }, { "id": 2166, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Andrea Rollins' or vendor = 'Andrea Rollins'" }, { "id": 2167, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Daily living assistance\" " }, { "id": 2168, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Kaitlyn Dorsey\"" }, { "id": 2169, "SQL": "select transaction_id from master_txn_table where product_service = \"Postal\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 2170, "SQL": "select transaction_date from master_txn_table where customers = \"Holly Erickson\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 2171, "SQL": "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,\"Baby carriers\") and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 2172, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brian Rocha\" ) " }, { "id": 2173, "SQL": "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,\"Medical services\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 2174, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 2175, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") group by product_service order by sum(credit) desc limit 1" }, { "id": 2176, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Laurie Rodriguez\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 2177, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Amanda Howard\" ) " }, { "id": 2178, "SQL": "select transaction_date from master_txn_table where customers = \"Joseph Wise\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 2179, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Robert Gardner\" ) " }, { "id": 2180, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jennifer Barnett\" ) " }, { "id": 2181, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Erika Allen\" and transaction_type = 'invoice'" }, { "id": 2182, "SQL": "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,\"Uncategorized Income\") and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 2183, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 2184, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Gregory Tucker\" order by transaction_date limit 1" }, { "id": 2185, "SQL": "select transaction_date 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 = \"Shipping\" order by transaction_date asc limit 1 " }, { "id": 2186, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Michael Lopez\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 2187, "SQL": "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,\"Photocopying services\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 2188, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ross Stephenson\" ) " }, { "id": 2189, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Adam Moran\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) ) " }, { "id": 2190, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 2191, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Street vending locations\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 2192, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Joseph Rice\" ) " }, { "id": 2193, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') order by sum(debit) desc limit 1" }, { "id": 2194, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jerry Johnson\"" }, { "id": 2195, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Darrell Powell\"" }, { "id": 2196, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Lindsey Wright\" order by transaction_date limit 1" }, { "id": 2197, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Timothy Turner\" ) " }, { "id": 2198, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Lindsey Miller\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 2199, "SQL": "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 engines and parts\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 2200, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 2201, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Danny Henry\" and transaction_type = 'invoice'" }, { "id": 2202, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 2203, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') order by sum(debit) desc limit 1" }, { "id": 2204, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 2205, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 2206, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Thomas Cline\" order by transaction_date limit 1" }, { "id": 2207, "SQL": "select transaction_date 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 = \"Service Provisioning\" order by transaction_date asc limit 1 " }, { "id": 2208, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Michael Jacobs\"" }, { "id": 2209, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Tiffany Newton\" and transaction_type = 'invoice'" }, { "id": 2210, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Joshua Howard\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 2211, "SQL": "select sum(credit) from master_txn_table where product_service = \"Musicians\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 2212, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') group by billing_city" }, { "id": 2213, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 2214, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Bookkeeper\") and vendor = \"Stephanie Johnson\"" }, { "id": 2215, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 2216, "SQL": "select sum(credit) from master_txn_table where product_service = \"Gifts and grants\" and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 2217, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Karen Armstrong\" ) " }, { "id": 2218, "SQL": "select transaction_date from master_txn_table where customers = \"Frank Peters\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 2219, "SQL": "select transaction_date from master_txn_table where customers = \"Randy Coleman\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 2220, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Michael Hernandez\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 2221, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Providing personal care\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 2222, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') 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') order by sum(debit) desc limit 1" }, { "id": 2223, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brittany Trujillo\" ) " }, { "id": 2224, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 2225, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Walter Roberts MD\" ) " }, { "id": 2226, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 2227, "SQL": "select transaction_id from master_txn_table where customers = \"David Huber\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 2228, "SQL": "select transaction_date from master_txn_table where customers = \"Cassidy Hinton\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 2229, "SQL": "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,\"Attire and accessories\") and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 2230, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Eduardo Hernandez\" ) " }, { "id": 2231, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Michael Hardy\" ) " }, { "id": 2232, "SQL": "select transaction_date 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 = \"Boats\" order by transaction_date asc limit 1 " }, { "id": 2233, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Baby formula and food\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 2234, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Melissa Rogers\"" }, { "id": 2235, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 2236, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Marie Nelson\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 2237, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Ryan Sexton' or vendor = 'Ryan Sexton'" }, { "id": 2238, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Taylor Soto\" and transaction_type = 'payment' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') ) " }, { "id": 2239, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 2240, "SQL": "select transaction_id from master_txn_table where product_service = \"Teen outreach\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 2241, "SQL": "select transaction_date from master_txn_table where customers = \"Samuel Greene\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 2242, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') and account_type in ('Expense','Other Expense') " }, { "id": 2243, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Samantha Burke\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 2244, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Jacob Armstrong\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 2245, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 2246, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Job Expenses\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 2247, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Charles Young\" ) " }, { "id": 2248, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Ryan Harris\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') ) " }, { "id": 2249, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Crystal Ray\" and transaction_type = 'invoice'" }, { "id": 2250, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 2251, "SQL": "select transaction_date from master_txn_table where customers = \"Stephen Banks\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 2252, "SQL": "select transaction_date 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 = \"PCs\" order by transaction_date asc limit 1 " }, { "id": 2253, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Victor Woodward' or vendor = 'Victor Woodward'" }, { "id": 2254, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 2255, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') group by billing_city" }, { "id": 2256, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Carl Gray\" ) " }, { "id": 2257, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Alicia Brown\" ) " }, { "id": 2258, "SQL": "select transaction_date 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 = \"Nonfossil-fuel\" order by transaction_date asc limit 1 " }, { "id": 2259, "SQL": "select sum(credit) from master_txn_table where product_service = \"Pool maintenance\" and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 2260, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') order by sum(debit) desc limit 1" }, { "id": 2261, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 2262, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 2263, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 2264, "SQL": "select transaction_id from master_txn_table where product_service = \"Home-care\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 2265, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Workers Compensation\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 2266, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Caroline Lee\" order by transaction_date limit 1" }, { "id": 2267, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Joseph Colon\" and transaction_type = 'payment' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') ) " }, { "id": 2268, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Paula Steele\" and transaction_type = 'payment' 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') ) " }, { "id": 2269, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Janet White\"" }, { "id": 2270, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Dietary and Nutritional\" " }, { "id": 2271, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Hailey Schmidt\" ) " }, { "id": 2272, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Carrie King\" ) " }, { "id": 2273, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Jeremiah Frye\" and account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 2274, "SQL": "select transaction_date from master_txn_table where customers = \"Melvin Huang\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 2275, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") and account_type in ('Expense','Other Expense') " }, { "id": 2276, "SQL": "select sum(credit) from master_txn_table where product_service = \"Healthcare\" and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 2277, "SQL": "select transaction_date from master_txn_table where customers = \"Leslie Avery\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 2278, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') group by billing_city" }, { "id": 2279, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Fuel\") and vendor = \"Victoria Delacruz\"" }, { "id": 2280, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Abandoned infant assistance\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 2281, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by billing_city" }, { "id": 2282, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Labor\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 2283, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 2284, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Yvonne Leonard DDS\" ) " }, { "id": 2285, "SQL": "select transaction_date from master_txn_table where customers = \"Christian Daniels\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 2286, "SQL": "select transaction_date 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 = \"IT and telecommunication\" order by transaction_date asc limit 1 " }, { "id": 2287, "SQL": "select avg(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 = \"Katelyn Thompson\" and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 2288, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' 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') " }, { "id": 2289, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Kyle Hendrix\" and transaction_type = 'invoice'" }, { "id": 2290, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 2291, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') group by billing_city" }, { "id": 2292, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Thomas Obrien\" ) " }, { "id": 2293, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Gary Cohen\" ) " }, { "id": 2294, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') group by billing_city" }, { "id": 2295, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Cheryl Medina\" ) " }, { "id": 2296, "SQL": "select transaction_date from master_txn_table where customers = \"Joel Young\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 2297, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 2298, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 2299, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 2300, "SQL": "select max(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 = \"Rhonda Lee\" and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 2301, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 2302, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Robert Sawyer\" order by transaction_date limit 1" }, { "id": 2303, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Tanya Stevenson\"" }, { "id": 2304, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 2305, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date) AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 2306, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Michelle Meyers\" order by transaction_date limit 1" }, { "id": 2307, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 2308, "SQL": "select transaction_date 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 = \"Physical Therapy\" order by transaction_date asc limit 1 " }, { "id": 2309, "SQL": "select sum(credit) from master_txn_table where product_service = \"Peppermint oil\" and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 2310, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 2311, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 2312, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Maria Mosley\" and transaction_type = 'payment' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') ) " }, { "id": 2313, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Caitlyn Williams' or vendor = 'Caitlyn Williams'" }, { "id": 2314, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Eugene Williams\"" }, { "id": 2315, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") and account_type in ('Expense','Other Expense') " }, { "id": 2316, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') group by product_service order by sum(credit) desc limit 1" }, { "id": 2317, "SQL": "select sum(credit) from master_txn_table where product_service = \"Trust and Fiduciary\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 2318, "SQL": "select sum(credit) from master_txn_table where product_service = \"Farrier\" and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 2319, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Omar Bentley\" order by transaction_date limit 1" }, { "id": 2320, "SQL": "select transaction_date 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 = \"Rental\" order by transaction_date asc limit 1 " }, { "id": 2321, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Melissa Thomas' or vendor = 'Melissa Thomas'" }, { "id": 2322, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Julia Woods\"" }, { "id": 2323, "SQL": "select transaction_id from master_txn_table where product_service = \"Computer Programming\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 2324, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 2325, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') and account_type in ('Expense','Other Expense') " }, { "id": 2326, "SQL": "select transaction_id from master_txn_table where product_service = \"Breeding\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 2327, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Amanda Smith\" and account_type in ('Expense','Other Expense') and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 2328, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Wendy Dalton\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") ) " }, { "id": 2329, "SQL": "select min(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 = \"Stephen Patel\" and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 2330, "SQL": "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 essential oils\") and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 2331, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Theresa Stanley\" and transaction_type = 'invoice'" }, { "id": 2332, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"John Riley\" ) " }, { "id": 2333, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Paul Romero\" ) " }, { "id": 2334, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Amy Nelson\" ) " }, { "id": 2335, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Aircraft Engines\" " }, { "id": 2336, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kathleen Kennedy\" ) " }, { "id": 2337, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 2338, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lindsay Moreno\" ) " }, { "id": 2339, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Crystal Guerrero\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 2340, "SQL": "select transaction_id from master_txn_table where customers = \"Alison Schroeder\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 2341, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 2342, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Telephone\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 2343, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Construction management services\") and 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') " }, { "id": 2344, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Amy Anthony\" order by transaction_date limit 1" }, { "id": 2345, "SQL": "select sum(credit) from master_txn_table where product_service = \"Chairs\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 2346, "SQL": "select product_service, 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 transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') group by product_service order by sum(credit) desc limit 1" }, { "id": 2347, "SQL": "select transaction_id from master_txn_table where customers = \"Nathan Alexander\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 2348, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jacob Shepherd\" ) " }, { "id": 2349, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Amy Hernandez\" order by transaction_date limit 1" }, { "id": 2350, "SQL": "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,\"Physical therapy\") and 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') " }, { "id": 2351, "SQL": "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,\"Foster care placement services\") and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 2352, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 2353, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 2354, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Youth community center services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 2355, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Cindy Hendricks\"" }, { "id": 2356, "SQL": "select transaction_date from master_txn_table where customers = \"Steven Cruz\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 2357, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name 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 account_type in ('Expense','Other Expense') " }, { "id": 2358, "SQL": "select transaction_id from master_txn_table where product_service = \"Voice & Speech Recognition\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 2359, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 2360, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Shawn Rodgers\" ) " }, { "id": 2361, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Daniel Stuart\" ) " }, { "id": 2362, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 2363, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by billing_city" }, { "id": 2364, "SQL": "select transaction_date from master_txn_table where customers = \"Michael Garza\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 2365, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Chad Archer\" order by transaction_date limit 1" }, { "id": 2366, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Julie Cox\" ) " }, { "id": 2367, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 2368, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Becky Bolton\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 2369, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 2370, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 2371, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Christopher Dixon\" ) " }, { "id": 2372, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Reginald Medina\"" }, { "id": 2373, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Amy Christian\" and transaction_type = 'invoice'" }, { "id": 2374, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Constructing multiunit special-needs complexes\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 2375, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 2376, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Carla Rivera\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 2377, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Keith Wu\" ) " }, { "id": 2378, "SQL": "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,\"Web hosting\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 2379, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jason Ramsey\" ) " }, { "id": 2380, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 2381, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Faith George\" and transaction_type = 'invoice'" }, { "id": 2382, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jaime Sexton\" ) " }, { "id": 2383, "SQL": "select transaction_date from master_txn_table where customers = \"Ryan Petersen\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 2384, "SQL": "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,\"Office Expenses\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 2385, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Shelley Johnson\" ) " }, { "id": 2386, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 2387, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' 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') " }, { "id": 2388, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jacqueline Mcgee\" ) " }, { "id": 2389, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 2390, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Ventilation cleaning\") and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 2391, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 2392, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Rebecca Holder\" order by transaction_date limit 1" }, { "id": 2393, "SQL": "select transaction_id from master_txn_table where customers = \"George Richardson\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 2394, "SQL": "select product_service, 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 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') group by product_service order by sum(credit) desc limit 1" }, { "id": 2395, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Patricia Taylor\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 2396, "SQL": "select min(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 = \"Bryan Benjamin\" and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 2397, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Krista Jimenez' or vendor = 'Krista Jimenez'" }, { "id": 2398, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 2399, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Andrea Thomas\" and transaction_type = 'payment' and 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') ) " }, { "id": 2400, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Cynthia Perry MD\" ) " }, { "id": 2401, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Transportation\" " }, { "id": 2402, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 2403, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Barry Hodges\" ) " }, { "id": 2404, "SQL": "select transaction_date 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 = \"Service Provider\" order by transaction_date asc limit 1 " }, { "id": 2405, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Craig Wilson\" ) " }, { "id": 2406, "SQL": "select transaction_date from master_txn_table where customers = \"Darren Jacobs\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 2407, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Veronica Wang\" order by transaction_date limit 1" }, { "id": 2408, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 2409, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Victoria Delacruz\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 2410, "SQL": "select transaction_date from master_txn_table where customers = \"Tina Burch\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 2411, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Stacey Webb\" ) " }, { "id": 2412, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 2413, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Heavy construction equipment rental\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 2414, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Trevor Mata\" ) " }, { "id": 2415, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 2416, "SQL": "select transaction_id from master_txn_table where product_service = \"Mobile Device\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 2417, "SQL": "select transaction_date from master_txn_table where customers = \"Cynthia Thomas\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 2418, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Steven Briggs\" ) " }, { "id": 2419, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"James Carr\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 2420, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Steven Taylor' or vendor = 'Steven Taylor'" }, { "id": 2421, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Catherine Perry\"" }, { "id": 2422, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Mitchell Johnson V\"" }, { "id": 2423, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 2424, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Timothy Oconnell\" ) " }, { "id": 2425, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Anthony Foster\" ) " }, { "id": 2426, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Paige Davis\" ) " }, { "id": 2427, "SQL": "select transaction_id from master_txn_table where customers = \"Traci Jacobson\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 2428, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Alan Orozco\" ) " }, { "id": 2429, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Peter Lopez\" ) " }, { "id": 2430, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Cheryl Cline\" ) " }, { "id": 2431, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Elizabeth Cuevas MD\" ) " }, { "id": 2432, "SQL": "select min(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 = \"Daniel Price\" 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') " }, { "id": 2433, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Bruce Kramer\" order by transaction_date limit 1" }, { "id": 2434, "SQL": "select min(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 = \"Kristi Franco\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 2435, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 2436, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Youth community center services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 2437, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 2438, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"William Freeman\" ) " }, { "id": 2439, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Stacy Williams\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 2440, "SQL": "select transaction_id from master_txn_table where product_service = \"Youth community\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 2441, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Other renewable-fueled power generation\") 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') " }, { "id": 2442, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Reprographic services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 2443, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Construction management\" " }, { "id": 2444, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Andrea Rogers\" and transaction_type = 'invoice'" }, { "id": 2445, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Christina Hernandez\" ) " }, { "id": 2446, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 2447, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Benjamin Lang\" ) " }, { "id": 2448, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 2449, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kristin Ferguson\" ) " }, { "id": 2450, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Kathleen Baker\"" }, { "id": 2451, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Connor Ford\" ) " }, { "id": 2452, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 2453, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Cynthia Hughes\" ) " }, { "id": 2454, "SQL": "select transaction_date from master_txn_table where customers = \"Randy Garcia\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 2455, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Offering equity long bias\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 2456, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jay Dunn\"" }, { "id": 2457, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Travel\") and vendor = \"Helen Smith\"" }, { "id": 2458, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jordan Oneill\" ) " }, { "id": 2459, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Julie Oneal\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) ) " }, { "id": 2460, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Providing trust and fiduciary services\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 2461, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Gregory Welch\"" }, { "id": 2462, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Benjamin Silva\"" }, { "id": 2463, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 2464, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Keith Garcia DDS\" ) " }, { "id": 2465, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 2466, "SQL": "select transaction_date 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 = \"Industrial manufacturing\" order by transaction_date asc limit 1 " }, { "id": 2467, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 2468, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Roger Bates\" order by transaction_date limit 1" }, { "id": 2469, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Briana Bradshaw\" order by transaction_date limit 1" }, { "id": 2470, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Tanya Long\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 2471, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Frank Walker\" and account_type in ('Expense','Other Expense') and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 2472, "SQL": "select transaction_date 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 = \"Barge\" order by transaction_date asc limit 1 " }, { "id": 2473, "SQL": "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,\"Fees Billed\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 2474, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Coin operated games and rides\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 2475, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 2476, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Carl Taylor\" ) " }, { "id": 2477, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Sandra Oliver\"" }, { "id": 2478, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') group by billing_city" }, { "id": 2479, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 2480, "SQL": "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 classes in stenography and court reporting\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 2481, "SQL": "select transaction_date from master_txn_table where customers = \"Michael Porter\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 2482, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Kristie Fernandez\" and account_type in ('Expense','Other Expense') 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') " }, { "id": 2483, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Building Repairs\") and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 2484, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Bethany Aguilar\" ) " }, { "id": 2485, "SQL": "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,\"Construction management services\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 2486, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Steno class\" " }, { "id": 2487, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') order by sum(debit) desc limit 1" }, { "id": 2488, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 2489, "SQL": "select transaction_date from master_txn_table where customers = \"Gene Ford\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 2490, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 2491, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Michelle Shaw\" ) " }, { "id": 2492, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Window washing\" " }, { "id": 2493, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Julia Walsh\" order by transaction_date limit 1" }, { "id": 2494, "SQL": "select transaction_date from master_txn_table where customers = \"Meredith Price\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 2495, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Julie Rivera\" ) " }, { "id": 2496, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"golf courses and country clubs\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 2497, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Theresa Chavez\" ) " }, { "id": 2498, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by billing_city" }, { "id": 2499, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Anna Schmidt\" ) " }, { "id": 2500, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"William Mcknight\" ) " }, { "id": 2501, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Helium manufacturing\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 2502, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sabrina Miller\" ) " }, { "id": 2503, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Danny Figueroa\" ) " }, { "id": 2504, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Brian Watson\"" }, { "id": 2505, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') group by billing_city" }, { "id": 2506, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Peter Clark\" ) " }, { "id": 2507, "SQL": "select transaction_date from master_txn_table where customers = \"Catherine Peters\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 2508, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Linda Reeves\" and account_type in ('Expense','Other Expense') and 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') " }, { "id": 2509, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Jeffrey Ford' or vendor = 'Jeffrey Ford'" }, { "id": 2510, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 2511, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date) AND date(current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 2512, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 2513, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Providing freight car cleaning services\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 2514, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 2515, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Julia Martin' or vendor = 'Julia Martin'" }, { "id": 2516, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 2517, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Sean Torres\"" }, { "id": 2518, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by billing_city" }, { "id": 2519, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 2520, "SQL": "select transaction_date 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 = \"Nitrogen\" order by transaction_date asc limit 1 " }, { "id": 2521, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 2522, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 2523, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Hannah Haynes\" order by transaction_date limit 1" }, { "id": 2524, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Construction Projects\" " }, { "id": 2525, "SQL": "select transaction_id from master_txn_table where customers = \"Stephen Ross\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 2526, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Emily Mora\"" }, { "id": 2527, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kevin Gregory\" ) " }, { "id": 2528, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 2529, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 2530, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 2531, "SQL": "select transaction_date 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 = \"AI Courses\" order by transaction_date asc limit 1 " }, { "id": 2532, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Timothy Richards' or vendor = 'Timothy Richards'" }, { "id": 2533, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 2534, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Henry Monroe' or vendor = 'Henry Monroe'" }, { "id": 2535, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Bowling\" " }, { "id": 2536, "SQL": "select transaction_date from master_txn_table where customers = \"Angela Watts\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 2537, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Darius Griffith\" order by transaction_date limit 1" }, { "id": 2538, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Retailing youth furniture\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 2539, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Railroad terminals\" " }, { "id": 2540, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') and account_type in ('Expense','Other Expense') " }, { "id": 2541, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Gregory Horton\" ) " }, { "id": 2542, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Purchases\") and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 2543, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 2544, "SQL": "select transaction_date from master_txn_table where customers = \"Kathryn Oliver\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 2545, "SQL": "select transaction_id from master_txn_table where customers = \"James Douglas\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 2546, "SQL": "select transaction_id from master_txn_table where customers = \"Tara Holland\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 2547, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date) AND date(current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 2548, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Rail transportation support and other products\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 2549, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 2550, "SQL": "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,\"Coin operated games and rides\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 2551, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 2552, "SQL": "select transaction_id from master_txn_table where customers = \"Thomas Shields\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 2553, "SQL": "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,\"Workers Compensation\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 2554, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"John Orr\" ) " }, { "id": 2555, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 2556, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"food and beverage services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 2557, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Becky Jones\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 2558, "SQL": "select transaction_id from master_txn_table where product_service = \"Macs\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 2559, "SQL": "select transaction_date from master_txn_table where customers = \"Rebekah Neal\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 2560, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Victoria Orr\" ) " }, { "id": 2561, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Shunting trailers\" " }, { "id": 2562, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Cody Hunter\" ) " }, { "id": 2563, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 2564, "SQL": "select max(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 = \"Katherine Figueroa\" and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 2565, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Deborah Cruz\" order by transaction_date limit 1" }, { "id": 2566, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 2567, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') order by sum(debit) desc limit 1" }, { "id": 2568, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 2569, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Private mailbox rental centers\") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 2570, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Casey Nelson\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 2571, "SQL": "select transaction_date from master_txn_table where customers = \"Kaylee Gilbert\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 2572, "SQL": "select transaction_date 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 = \"Swimming pool Cleaning\" order by transaction_date asc limit 1 " }, { "id": 2573, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Mitchell Johnson V\" ) " }, { "id": 2574, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kathy Castro MD\" ) " }, { "id": 2575, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 2576, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 2577, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"General contracting\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 2578, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Diana Harrison\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 2579, "SQL": "select transaction_id from master_txn_table where product_service = \"Aircraft Engines\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 2580, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kyle Thompson\" ) " }, { "id": 2581, "SQL": "select transaction_date 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 = \"Data storage management\" order by transaction_date asc limit 1 " }, { "id": 2582, "SQL": "select transaction_date 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 = \"Organic Gases\" order by transaction_date asc limit 1 " }, { "id": 2583, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Sierra Andrews\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 2584, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Taxes & Licenses\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 2585, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 2586, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 2587, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Coal exploration\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 2588, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Gregory Gilbert\"" }, { "id": 2589, "SQL": "select transaction_date from master_txn_table where customers = \"Elizabeth Hooper\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 2590, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 2591, "SQL": "select transaction_date 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 = \"Meals\" order by transaction_date asc limit 1 " }, { "id": 2592, "SQL": "select min(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 = \"Nicole Ramos\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 2593, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 2594, "SQL": "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 Synthetic Oils\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 2595, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"John Johnson\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) )" }, { "id": 2596, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)group by product_service order by sum(credit) desc limit 1" }, { "id": 2597, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Sarah Webb\"" }, { "id": 2598, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Warren Marquez\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 2599, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 2600, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Recognition software for healthcare\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 2601, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 2602, "SQL": "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,\"Services\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 2603, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 2604, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Dana Davies\" ) " }, { "id": 2605, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Alan Brown\" ) " }, { "id": 2606, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Katrina Jackson\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 2607, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Christopher Kelly\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 2608, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Steven Good\"" }, { "id": 2609, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by billing_city" }, { "id": 2610, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 2611, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brittney Phillips\" ) " }, { "id": 2612, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Mariah Sheppard' or vendor = 'Mariah Sheppard'" }, { "id": 2613, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Bradley Jackson\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 2614, "SQL": "select sum(credit) from master_txn_table where product_service = \"License fees\" and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 2615, "SQL": "select transaction_id from master_txn_table where customers = \"Edward Adams\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 2616, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Larry Lynch\" ) " }, { "id": 2617, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 2618, "SQL": "select transaction_date from master_txn_table where customers = \"Bill Gonzalez\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 2619, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 2620, "SQL": "select transaction_id from master_txn_table where customers = \"Timothy Mcdonald\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 2621, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 2622, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Travis Bray\" ) " }, { "id": 2623, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') group by billing_city" }, { "id": 2624, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by billing_city" }, { "id": 2625, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Natalie Anderson\" ) " }, { "id": 2626, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Anthony Daniels\"" }, { "id": 2627, "SQL": "select transaction_date from master_txn_table where customers = \"Brad Sanders\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 2628, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Mary Walter\" ) " }, { "id": 2629, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jay Chambers\" ) " }, { "id": 2630, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 2631, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 2632, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Matthew Carter\" ) " }, { "id": 2633, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Providing loading and unloading services at rail terminals\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 2634, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sandy Stewart MD\" ) " }, { "id": 2635, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') group by product_service order by sum(credit) desc limit 1" }, { "id": 2636, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Carrie Owen DDS\" order by transaction_date limit 1" }, { "id": 2637, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Wayne Ortiz\" ) " }, { "id": 2638, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Courtney Mcdaniel\" and transaction_type = 'invoice'" }, { "id": 2639, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Anne Hernandez\" and account_type in ('Expense','Other Expense') and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 2640, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 2641, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Uncategorized Expense\") and vendor = \"Hannah Smith\"" }, { "id": 2642, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Amber Rogers\" ) " }, { "id": 2643, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Edward Barker\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) )" }, { "id": 2644, "SQL": "select transaction_date 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 = \"Cementing walls\" order by transaction_date asc limit 1 " }, { "id": 2645, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Katelyn Carter\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 2646, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Andrew Phillips\" and transaction_type = 'payment' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') )" }, { "id": 2647, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"David Le\" ) " }, { "id": 2648, "SQL": "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,\"Packing services for goods\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 2649, "SQL": "select min(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 = \"Patrick Williams\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 2650, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 2651, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Cynthia Arnold\" ) " }, { "id": 2652, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 2653, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Street vending locations\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 2654, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Robert Francis\" ) " }, { "id": 2655, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lucas Norman\" ) " }, { "id": 2656, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 2657, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where 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') and account_type in ('Expense','Other Expense') " }, { "id": 2658, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jessica Gonzales\" ) " }, { "id": 2659, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 2660, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 2661, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 2662, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') 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') order by sum(debit) desc limit 1" }, { "id": 2663, "SQL": "select max(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 = \"Chad Koch\" and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 2664, "SQL": "select transaction_id from master_txn_table where product_service = \"Printing\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 2665, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 2666, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 2667, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Contract mining\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 2668, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Sydney Gonzalez\"" }, { "id": 2669, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 2670, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 2671, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Laura Dunn\"" }, { "id": 2672, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 2673, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Jeffrey Kelly\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 2674, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 2675, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Megan Dillon\" order by transaction_date limit 1" }, { "id": 2676, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Bruce Martinez\" and account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 2677, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Laura Mitchell\" order by transaction_date limit 1" }, { "id": 2678, "SQL": "select sum(credit) from master_txn_table where product_service = \"Musical\" and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 2679, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 2680, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 2681, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Database management\") 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') " }, { "id": 2682, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') order by sum(debit) desc limit 1" }, { "id": 2683, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Marcus Copeland\" ) " }, { "id": 2684, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Wood- and wood waste-fueled power generation\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 2685, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Social\" " }, { "id": 2686, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Jorge Edwards\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 2687, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Gregory York\" ) " }, { "id": 2688, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Medical services\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 2689, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Chelsea Bird\" ) " }, { "id": 2690, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Pool maintenance\" " }, { "id": 2691, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 2692, "SQL": "select transaction_date from master_txn_table where customers = \"Wayne Reynolds\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 2693, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 2694, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 2695, "SQL": "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,\"Development of software products for Macs\") and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 2696, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Eddie White\" ) " }, { "id": 2697, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 2698, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 2699, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Packing services for goods\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 2700, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 2701, "SQL": "select transaction_id from master_txn_table where customers = \"Craig Morris\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 2702, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Nancy Hunt\" ) " }, { "id": 2703, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Offering equity long bias\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 2704, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 2705, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Todd Garcia PhD\" ) " }, { "id": 2706, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Sara Perez\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 2707, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') order by sum(debit) desc limit 1" }, { "id": 2708, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Meghan Moore\" ) " }, { "id": 2709, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Popular music shows\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 2710, "SQL": "select transaction_date 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 = \"environmental projects\" order by transaction_date asc limit 1 " }, { "id": 2711, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 2712, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Frank Black\" and transaction_type = 'payment' 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') ) " }, { "id": 2713, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 2714, "SQL": "select max(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 = \"Deborah Weaver\" and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 2715, "SQL": "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,\"Popular music shows\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 2716, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Selena Horton\" ) " }, { "id": 2717, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Christina Dunn\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 2718, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Rental Services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 2719, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Hector Walsh\"" }, { "id": 2720, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Teresa Jimenez\" ) " }, { "id": 2721, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' 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') " }, { "id": 2722, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Deanna Edwards\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) )" }, { "id": 2723, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Julia Clark\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 2724, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Barbara Henderson\" ) " }, { "id": 2725, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Janice Lopez\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 2726, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"George Watson\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) )" }, { "id": 2727, "SQL": "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 support for money management\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 2728, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Furniture\" " }, { "id": 2729, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 2730, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Justin Bennett\" ) " }, { "id": 2731, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Other food services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 2732, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Michele Bowen\" and transaction_type = 'invoice'" }, { "id": 2733, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Alison Brandt\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") ) " }, { "id": 2734, "SQL": "select transaction_id from master_txn_table where product_service = \"Medical services\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 2735, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') and account_type in ('Expense','Other Expense') " }, { "id": 2736, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') group by billing_city" }, { "id": 2737, "SQL": "select product_service, 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 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') group by product_service order by sum(credit) desc limit 1" }, { "id": 2738, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Meghan Dyer\" ) " }, { "id": 2739, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Tricia Gordon\" order by transaction_date limit 1" }, { "id": 2740, "SQL": "select avg(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 = \"Hannah Fisher\" 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') " }, { "id": 2741, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Office Expenses\") and vendor = \"Glen Brock\"" }, { "id": 2742, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sean Day\" ) " }, { "id": 2743, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Tabitha Smith\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 2744, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 2745, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lawrence Torres\" ) " }, { "id": 2746, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 2747, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' 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') " }, { "id": 2748, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Dues & Subscriptions\") and vendor = \"Andrew Vargas\"" }, { "id": 2749, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sharon Rush\" ) " }, { "id": 2750, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 2751, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Fishing\" " }, { "id": 2752, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Tracy Harding\" ) " }, { "id": 2753, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Gerald Miller\" ) " }, { "id": 2754, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jennifer Olsen\" and transaction_type = 'invoice'" }, { "id": 2755, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Kevin Summers\" and transaction_type = 'payment' 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') ) " }, { "id": 2756, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 2757, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Bradley Boyer\" ) " }, { "id": 2758, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 2759, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Zachary Allen\" order by transaction_date limit 1" }, { "id": 2760, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 2761, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jonathan Morris\"" }, { "id": 2762, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jesus Ross\" ) " }, { "id": 2763, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Ryan Petersen\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 2764, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Jasmine Watson\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 2765, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Maintenance and repair work\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 2766, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jeffery Ortega\"" }, { "id": 2767, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Becky Brown\" ) " }, { "id": 2768, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 2769, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Clifford Mcdonald\" ) " }, { "id": 2770, "SQL": "select transaction_date 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 = \"Musicians\" order by transaction_date asc limit 1 " }, { "id": 2771, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Heather Clay\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 2772, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 2773, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 2774, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 2775, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Nancy Johnson\" ) " }, { "id": 2776, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Miguel Gardner\" and transaction_type = 'invoice'" }, { "id": 2777, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Camping and Parking\" " }, { "id": 2778, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Michael Lee\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 2779, "SQL": "select sum(credit) from master_txn_table where product_service = \"Attire and accessories\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 2780, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lisa Kane\" ) " }, { "id": 2781, "SQL": "select transaction_date from master_txn_table where customers = \"Lisa Bennett\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 2782, "SQL": "select product_service, 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 transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') group by product_service order by sum(credit) desc limit 1" }, { "id": 2783, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Private parcel mailing services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 2784, "SQL": "select max(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 = \"Sara Brown\" and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 2785, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Julie Nguyen\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 2786, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Shannon Jones\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 2787, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 2788, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Chimney sweep services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 2789, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 2790, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 2791, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Natalie Smith\" ) " }, { "id": 2792, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 2793, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Luke Morris\" ) " }, { "id": 2794, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 2795, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') and account_type in ('Expense','Other Expense') " }, { "id": 2796, "SQL": "select max(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 = \"Eugene Turner\" and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 2797, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kyle Roman\" ) " }, { "id": 2798, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Susan Cunningham\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 2799, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Christopher Daniels\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 2800, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Roger Bates\" ) " }, { "id": 2801, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") order by sum(debit) desc limit 1" }, { "id": 2802, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Job Materials\") and vendor = \"Nicole Wilson\"" }, { "id": 2803, "SQL": "select transaction_date from master_txn_table where customers = \"Dean Gross\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 2804, "SQL": "select transaction_date 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 = \"Popular music shows\" order by transaction_date asc limit 1 " }, { "id": 2805, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Jennifer Gentry\"" }, { "id": 2806, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Christopher Blake\"" }, { "id": 2807, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Full-service restaurants\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 2808, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Bicycle retailing\") and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 2809, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 2810, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Pool maintenance\" " }, { "id": 2811, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 2812, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Joshua Benton\" and transaction_type = 'invoice'" }, { "id": 2813, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Kathy Woods\"" }, { "id": 2814, "SQL": "select transaction_id from master_txn_table where customers = \"Nina Phillips\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 2815, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Keith Hines\" ) " }, { "id": 2816, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Christopher Moore\"" }, { "id": 2817, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") order by sum(debit) desc limit 1" }, { "id": 2818, "SQL": "select sum(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Home care\" " }, { "id": 2819, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Reginald Moore\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 2820, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by billing_city" }, { "id": 2821, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Artificial Intelligence Courses\") and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 2822, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 2823, "SQL": "select transaction_id from master_txn_table where product_service = \"Rental\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 2824, "SQL": "select transaction_id from master_txn_table where product_service = \"Swimming pool Cleaning\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 2825, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sean Cherry\" ) " }, { "id": 2826, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Michelle Bridges\"" }, { "id": 2827, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Jack Wells' or vendor = 'Jack Wells'" }, { "id": 2828, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 2829, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 2830, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Omar Williams\" order by transaction_date limit 1" }, { "id": 2831, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Amy Fernandez MD\"" }, { "id": 2832, "SQL": "select transaction_date from master_txn_table where customers = \"Michael Ball\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 2833, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Joshua Kim\" and account_type in ('Expense','Other Expense') and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 2834, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Matthew Mckinney\" order by transaction_date limit 1" }, { "id": 2835, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Kimberly Hamilton\" and account_type in ('Expense','Other Expense') and 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') " }, { "id": 2836, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 2837, "SQL": "select transaction_id from master_txn_table where product_service = \"Pool maintenance\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 2838, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Miranda Baker\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 2839, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Kristin Walters\" order by transaction_date limit 1" }, { "id": 2840, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Process management\") and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 2841, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 2842, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Stephen Gilmore\"" }, { "id": 2843, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Dana Bradshaw\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 2844, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Shirley Howell\" ) " }, { "id": 2845, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"William Armstrong\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 2846, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Kari Wilson\" and transaction_type = 'invoice'" }, { "id": 2847, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"John Armstrong\" ) " }, { "id": 2848, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"John Arnold\" ) " }, { "id": 2849, "SQL": "select transaction_date from master_txn_table where customers = \"Gary Davis\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 2850, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 2851, "SQL": "select transaction_date 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 = \"Home Therapy\" order by transaction_date asc limit 1 " }, { "id": 2852, "SQL": "select transaction_id from master_txn_table where product_service = \"Casings, Tubes and Rods\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 2853, "SQL": "select transaction_id from master_txn_table where customers = \"Cody Hunter\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 2854, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 2855, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Joseph Thompson\" ) " }, { "id": 2856, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"James Kelley\" ) " }, { "id": 2857, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Lisa Freeman\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 2858, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 2859, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Appearances and speeches\") and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 2860, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 2861, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Charles Graves\" ) " }, { "id": 2862, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Brandi Craig DVM\" order by transaction_date limit 1" }, { "id": 2863, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 2864, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Teen outreach\" " }, { "id": 2865, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 2866, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Melissa Beasley\" and transaction_type = 'invoice'" }, { "id": 2867, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Wholesaling railroad equipment and supplies\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 2868, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Victoria Jensen\" ) " }, { "id": 2869, "SQL": "select sum(credit) from master_txn_table where product_service = \"Mobile Device\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 2870, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 2871, "SQL": "select sum(credit) from master_txn_table where product_service = \"Financial\" and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 2872, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and 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') group by billing_city" }, { "id": 2873, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Blueprinting services\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 2874, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 2875, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Scott Long\" ) " }, { "id": 2876, "SQL": "select transaction_date 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 = \"Macro\" order by transaction_date asc limit 1 " }, { "id": 2877, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 2878, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Offering equity long bias\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 2879, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Social Service\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 2880, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Virginia Rollins\" ) " }, { "id": 2881, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Phillip Clark\" ) " }, { "id": 2882, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Job Expenses\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 2883, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Gregory White\" order by transaction_date limit 1" }, { "id": 2884, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Monica Roberts\" order by transaction_date limit 1" }, { "id": 2885, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Elizabeth Reed DVM\" ) " }, { "id": 2886, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Dawn Holloway\" ) " }, { "id": 2887, "SQL": "select transaction_id from master_txn_table where product_service = \"Heavy construction equipment\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 2888, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Robert Wells\" ) " }, { "id": 2889, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Angela Jackson\"" }, { "id": 2890, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Catherine Fowler\" ) " }, { "id": 2891, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Maintenance and Repairs\") and vendor = \"Joshua Fry\"" }, { "id": 2892, "SQL": "select transaction_id from master_txn_table where customers = \"Katelyn Gaines\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 2893, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") and account_type in ('Expense','Other Expense') " }, { "id": 2894, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Kevin Chavez DDS' or vendor = 'Kevin Chavez DDS'" }, { "id": 2895, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') group by billing_city" }, { "id": 2896, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 2897, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Christopher Velasquez\" ) " }, { "id": 2898, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Natasha Montgomery\"" }, { "id": 2899, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 2900, "SQL": "select transaction_id from master_txn_table where customers = \"Mike Ibarra\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 2901, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Noah Reynolds\" ) " }, { "id": 2902, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Joseph Moss\" and transaction_type = 'payment' 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') ) " }, { "id": 2903, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 2904, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Linda Roberts\"" }, { "id": 2905, "SQL": "select transaction_date from master_txn_table where customers = \"Sean House\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 2906, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kyle Dodson\" ) " }, { "id": 2907, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brian Murphy\" ) " }, { "id": 2908, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Sandra Davis\"" }, { "id": 2909, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Joshua Holland\" ) " }, { "id": 2910, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 2911, "SQL": "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,\"Computer Repair and Maintainenance\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 2912, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Monica Vaughn\" ) " }, { "id": 2913, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Casey Duran\" and transaction_type = 'payment' and 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') )" }, { "id": 2914, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Diving equipment retailing\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 2915, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Christopher Kennedy\" ) " }, { "id": 2916, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Leslie King\" ) " }, { "id": 2917, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 2918, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Lauren Bauer\"" }, { "id": 2919, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Spraying\" " }, { "id": 2920, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 2921, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Eddie Cox\" ) " }, { "id": 2922, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 2923, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Diana Esparza\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 2924, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 2925, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Erin Salas\" ) " }, { "id": 2926, "SQL": "select transaction_date from master_txn_table where customers = \"Angela Arnold\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 2927, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Angel Shelton\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) )" }, { "id": 2928, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Debra Hartman\" order by transaction_date limit 1" }, { "id": 2929, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 2930, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Robert Nelson\" order by transaction_date limit 1" }, { "id": 2931, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Building Repairs\") and vendor = \"Brian Brown\"" }, { "id": 2932, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 2933, "SQL": "select transaction_id from master_txn_table where customers = \"Autumn Gibbs\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 2934, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 2935, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date) AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 2936, "SQL": "select sum(credit) from master_txn_table where product_service = \"Food\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 2937, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 2938, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Michael Carrillo\" ) " }, { "id": 2939, "SQL": "select transaction_id from master_txn_table where product_service = \"Grapefruit oil\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 2940, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Patricia Porter\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") ) " }, { "id": 2941, "SQL": "select transaction_id from master_txn_table where product_service = \"Bedding\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 2942, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Leslie Reed\" ) " }, { "id": 2943, "SQL": "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,\"Shearing services\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 2944, "SQL": "select sum(credit) from master_txn_table where product_service = \"Data entry\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 2945, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Robert Hernandez\" ) " }, { "id": 2946, "SQL": "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,\"Telephone\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 2947, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Virginia Montes DDS\" ) " }, { "id": 2948, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ian Contreras\" ) " }, { "id": 2949, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Cost of Labor\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 2950, "SQL": "select transaction_id from master_txn_table where product_service = \"Installation\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 2951, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 2952, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Justin Cowan\"" }, { "id": 2953, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Rebecca Mueller\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 2954, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Abigail Butler\" ) " }, { "id": 2955, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Fast food restaurants\") and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 2956, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 2957, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 2958, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jamie Clark\" ) " }, { "id": 2959, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Caitlyn Hawkins\" ) " }, { "id": 2960, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Ariel Phelps\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 2961, "SQL": "select max(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 = \"Robert Wolfe\" and 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') " }, { "id": 2962, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') group by billing_city" }, { "id": 2963, "SQL": "select transaction_date from master_txn_table where customers = \"Cynthia Martin\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 2964, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Patricia Kline\" ) " }, { "id": 2965, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 2966, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Randall Ryan\" ) " }, { "id": 2967, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) group by billing_city" }, { "id": 2968, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Cynthia Cruz\" ) " }, { "id": 2969, "SQL": "select transaction_date 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 = \"Railcar\" order by transaction_date asc limit 1 " }, { "id": 2970, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Carrie Hughes\" ) " }, { "id": 2971, "SQL": "select avg(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 = \"Laura Yates\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 2972, "SQL": "select transaction_id from master_txn_table where customers = \"William Rasmussen\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 2973, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 2974, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Party favors\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 2975, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 2976, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Terri Abbott\" ) " }, { "id": 2977, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 2978, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Perforating well casings\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 2979, "SQL": "select transaction_date from master_txn_table where customers = \"Garrett Bell\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 2980, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Repairing locomotives and railcars (except factory conversion, overhaul and rebuilding)\") and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 2981, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Justin Schmidt\" order by transaction_date limit 1" }, { "id": 2982, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Coordinators\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 2983, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 2984, "SQL": "select max(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 = \"David Moss\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 2985, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Andrew Malone\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') ) " }, { "id": 2986, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 2987, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"David Hamilton\"" }, { "id": 2988, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Hotels and motel services\") and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 2989, "SQL": "select sum(credit) from master_txn_table where product_service = \"Wells\" and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 2990, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jonathan Lang\" order by transaction_date limit 1" }, { "id": 2991, "SQL": "select avg(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 = \"James Carter\" and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 2992, "SQL": "select transaction_id from master_txn_table where customers = \"Christopher Howard\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 2993, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Debra Mueller\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) )" }, { "id": 2994, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Gabriel Hernandez\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) ) " }, { "id": 2995, "SQL": "select transaction_date 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\" order by transaction_date asc limit 1 " }, { "id": 2996, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Christopher Flores' or vendor = 'Christopher Flores'" }, { "id": 2997, "SQL": "select transaction_id from master_txn_table where product_service = \"Mailbox Services\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 2998, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 2999, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Forestry and logging machinery and equipment rental or leasing\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 3000, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') group by billing_city" }, { "id": 3001, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Susan Gray\" ) " }, { "id": 3002, "SQL": "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,\"Accounts Receivable (A/R)\") and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 3003, "SQL": "select transaction_date from master_txn_table where customers = \"Jeffrey Moody\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 3004, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Erica Marquez\"" }, { "id": 3005, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') group by billing_city" }, { "id": 3006, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Tabitha Watson\" ) " }, { "id": 3007, "SQL": "select transaction_date from master_txn_table where customers = \"Scott Harding\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 3008, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Youth\" " }, { "id": 3009, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Nancy Erickson\" and account_type in ('Expense','Other Expense') and 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') " }, { "id": 3010, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 3011, "SQL": "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,\"Travel Meals\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 3012, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Terri Sweeney\" ) " }, { "id": 3013, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Holly Shaffer\" ) " }, { "id": 3014, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Ethical Hacking Training\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 3015, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jason Sullivan IV\" ) " }, { "id": 3016, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Andrea Small\" ) " }, { "id": 3017, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Steven Reed\"" }, { "id": 3018, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') 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') order by sum(debit) desc limit 1" }, { "id": 3019, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Tiffany Gray\" order by transaction_date limit 1" }, { "id": 3020, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brandon Higgins\" ) " }, { "id": 3021, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Stephen Marshall\" ) " }, { "id": 3022, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ryan Burgess\" ) " }, { "id": 3023, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Charles Reed\" ) " }, { "id": 3024, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 3025, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Stacy Rice\" ) " }, { "id": 3026, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brittany Tate\" ) " }, { "id": 3027, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Donna Hudson\" order by transaction_date limit 1" }, { "id": 3028, "SQL": "select transaction_id from master_txn_table where customers = \"Edward Garcia\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 3029, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Heather Cox\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 3030, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Samantha Gardner\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 3031, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kelly Robinson\" ) " }, { "id": 3032, "SQL": "select transaction_id from master_txn_table where product_service = \"Renewable-fueled\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 3033, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 3034, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Warren Sanchez\" ) " }, { "id": 3035, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' 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') " }, { "id": 3036, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 3037, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Motorbike \") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 3038, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') and account_type in ('Expense','Other Expense') " }, { "id": 3039, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Anthony Banks\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') )" }, { "id": 3040, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Frank Cardenas\" ) " }, { "id": 3041, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"James Hobbs\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 3042, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 3043, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 3044, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 3045, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Betty Richards\"" }, { "id": 3046, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Mandy Small\" and transaction_type = 'payment' and 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') ) " }, { "id": 3047, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kyle Bradshaw\" ) " }, { "id": 3048, "SQL": "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 = \"Marcus Miller\" and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 3049, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Lauren Cook\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 3050, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Tina Kim\" ) " }, { "id": 3051, "SQL": "select transaction_date from master_txn_table where customers = \"Heather Perry\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 3052, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Tina Leonard\" ) " }, { "id": 3053, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Housing\" " }, { "id": 3054, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Tristan Hudson\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') ) " }, { "id": 3055, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 3056, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Christine Garcia\" ) " }, { "id": 3057, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Christopher Allen\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) ) " }, { "id": 3058, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Kiara Manning\"" }, { "id": 3059, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Omar Bentley\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) ) " }, { "id": 3060, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Jeffrey Cruz\"" }, { "id": 3061, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Kathy Snyder\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) ) " }, { "id": 3062, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Travel Meals\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 3063, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 3064, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Carrie Preston\" order by transaction_date limit 1" }, { "id": 3065, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Billy Medina\" ) " }, { "id": 3066, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Derek Weeks\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') ) " }, { "id": 3067, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Charles Wells\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 3068, "SQL": "select transaction_date from master_txn_table where customers = \"Judy Lawrence\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 3069, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Ian Meadows\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 3070, "SQL": "select transaction_date from master_txn_table where customers = \"Denise Calderon\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 3071, "SQL": "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 = \"Travis Butler\" and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 3072, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brian Byrd\" ) " }, { "id": 3073, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') group by billing_city" }, { "id": 3074, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sabrina Nelson\" ) " }, { "id": 3075, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jacqueline Ryan\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 3076, "SQL": "select transaction_date 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\" order by transaction_date asc limit 1 " }, { "id": 3077, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by billing_city" }, { "id": 3078, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Jenny Jackson\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) )" }, { "id": 3079, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Heather Bell\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 3080, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') and account_type in ('Expense','Other Expense') " }, { "id": 3081, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"IT and telecommunication\" " }, { "id": 3082, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Spraying services\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 3083, "SQL": "select transaction_id from master_txn_table where product_service = \"Memberships\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 3084, "SQL": "select sum(credit) from master_txn_table where product_service = \"Lemon oil\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 3085, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Retailing master bedroom furniture\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 3086, "SQL": "select product_service, 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 transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') group by product_service order by sum(credit) desc limit 1" }, { "id": 3087, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Retailing stationary sofas/sofa-sleepers\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 3088, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Megan Martinez\" ) " }, { "id": 3089, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Coal Power generation\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 3090, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Matthew Cole\" ) " }, { "id": 3091, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Adrian Vasquez\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) ) " }, { "id": 3092, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 3093, "SQL": "select transaction_id from master_txn_table where customers = \"Brian Huang\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 3094, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Micheal White\" ) " }, { "id": 3095, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Fast food restaurants\") and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 3096, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 3097, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Debra Bailey\" ) " }, { "id": 3098, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Michael Gonzalez\" order by transaction_date limit 1" }, { "id": 3099, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'James Steele' or vendor = 'James Steele'" }, { "id": 3100, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 3101, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Tyler Robinson\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") ) " }, { "id": 3102, "SQL": "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,\"Discounts given\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 3103, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Development of other voice and speech recognition products\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 3104, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 3105, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Mailbox Services\" " }, { "id": 3106, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 3107, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Construction management services\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 3108, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Randall Burns\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 3109, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Leveling and Trimming\" " }, { "id": 3110, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Holly Mcneil\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 3111, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 3112, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Rent or Lease\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 3113, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 3114, "SQL": "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,\"Rent or Lease\") and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 3115, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 3116, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Deanna Morton\" and transaction_type = 'invoice'" }, { "id": 3117, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Hannah Robertson\"" }, { "id": 3118, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Scott Brennan\" ) " }, { "id": 3119, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 3120, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"James Smith DDS\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) ) " }, { "id": 3121, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 3122, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Patricia Macias\"" }, { "id": 3123, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Patricia Norman\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 3124, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Megan Dudley\" ) " }, { "id": 3125, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 3126, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Commissions & fees\") and vendor = \"Patricia Lewis\"" }, { "id": 3127, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Christina Woods\" ) " }, { "id": 3128, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Fast food restaurants\") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 3129, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and 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') order by sum(debit) desc limit 1" }, { "id": 3130, "SQL": "select transaction_date from master_txn_table where customers = \"Lee Combs\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 3131, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Corey Edwards\" ) " }, { "id": 3132, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Abigail Patel\" order by transaction_date limit 1" }, { "id": 3133, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"James Lopez\"" }, { "id": 3134, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Mark Warren\" ) " }, { "id": 3135, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Aaron Hardin' or vendor = 'Aaron Hardin'" }, { "id": 3136, "SQL": "select min(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 = \"William Watson\" and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 3137, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 3138, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') group by billing_city" }, { "id": 3139, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 3140, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jaime Davis\" order by transaction_date limit 1" }, { "id": 3141, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 3142, "SQL": "select transaction_date from master_txn_table where customers = \"Katrina Holloway\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 3143, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jennifer Hunter\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 3144, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Eileen Cox\" ) " }, { "id": 3145, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Retailing home office furniture\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 3146, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Baby toys\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 3147, "SQL": "select transaction_date from master_txn_table where customers = \"John Erickson\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 3148, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Courtney Morales\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') ) " }, { "id": 3149, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Oxygen manufacturing\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 3150, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') group by billing_city" }, { "id": 3151, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Laura Jones\" and transaction_type = 'payment' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') )" }, { "id": 3152, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') group by billing_city" }, { "id": 3153, "SQL": "select min(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 = \"Kristen Reynolds\" and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 3154, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Retailing Chairs\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 3155, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Stefanie Herrera' or vendor = 'Stefanie Herrera'" }, { "id": 3156, "SQL": "select transaction_id from master_txn_table where product_service = \"Construction Projects\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 3157, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Paul Myers\"" }, { "id": 3158, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Derek Walker\" ) " }, { "id": 3159, "SQL": "select sum(credit) from master_txn_table where product_service = \"Youth guidance\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 3160, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Sean Duncan\" and transaction_type = 'payment' 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') )" }, { "id": 3161, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lori Bryan\" ) " }, { "id": 3162, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 3163, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") order by sum(debit) desc limit 1" }, { "id": 3164, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 3165, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 3166, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jeremy Watson\" order by transaction_date limit 1" }, { "id": 3167, "SQL": "select transaction_date 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 = \"Duct and gutter cleaning\" order by transaction_date asc limit 1 " }, { "id": 3168, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Paula Lucas\" ) " }, { "id": 3169, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Elizabeth Martinez\"" }, { "id": 3170, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Daniel Peterson\"" }, { "id": 3171, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"License fees\") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 3172, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Computer Repairs\") and vendor = \"Margaret Harvey\"" }, { "id": 3173, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 3174, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Helen Strong\" ) " }, { "id": 3175, "SQL": "select transaction_id from master_txn_table where customers = \"Katherine James\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 3176, "SQL": "select transaction_date from master_txn_table where customers = \"Kendra Wheeler\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 3177, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Rachel Davis\" ) " }, { "id": 3178, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Brittany Hawkins\"" }, { "id": 3179, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Other accommodation services\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 3180, "SQL": "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,\"Physical therapy\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 3181, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Juan Martin' or vendor = 'Juan Martin'" }, { "id": 3182, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Barry Perez\" ) " }, { "id": 3183, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 3184, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 3185, "SQL": "select transaction_date from master_txn_table where customers = \"Danny Kelly\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 3186, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Neil Mejia\" ) " }, { "id": 3187, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 3188, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Christina Gibson\" order by transaction_date limit 1" }, { "id": 3189, "SQL": "select transaction_date from master_txn_table where customers = \"Anthony Silva\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 3190, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Taxes & Licenses\") and vendor = \"Michael Johnson\"" }, { "id": 3191, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Emily Foley\" ) " }, { "id": 3192, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 3193, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Providing shunting trailers in rail terminals\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 3194, "SQL": "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,\"Dance performances\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 3195, "SQL": "select sum(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Auto sector\" " }, { "id": 3196, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Debra Harvey\" ) " }, { "id": 3197, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 3198, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Thomas Lang\" ) " }, { "id": 3199, "SQL": "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,\"Offering emerging market funds\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 3200, "SQL": "select transaction_id from master_txn_table where customers = \"Alexandra Mccoy\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 3201, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 3202, "SQL": "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 sporting goods retailing\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 3203, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Michael Moss\" ) " }, { "id": 3204, "SQL": "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,\"Ventilation cleaning\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 3205, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Wholesaling boats (except pleasure)\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 3206, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Samuel Lewis\"" }, { "id": 3207, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 3208, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Melissa Harris\" ) " }, { "id": 3209, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Morgan Allen\" order by transaction_date limit 1" }, { "id": 3210, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 3211, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Teen outreach services\") and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 3212, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Installation\") and vendor = \"Michelle Garrett\"" }, { "id": 3213, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Douglas Myers\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 3214, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Michael Gordon\" order by transaction_date limit 1" }, { "id": 3215, "SQL": "select transaction_id from master_txn_table where customers = \"Edward Nelson\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 3216, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Erica Bolton\" ) " }, { "id": 3217, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 3218, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Daniel Gallagher\" ) " }, { "id": 3219, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Erik Miller MD\" ) " }, { "id": 3220, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Oil field machinery and equipment rental or leasing\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 3221, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brian Becker\" ) " }, { "id": 3222, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 3223, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Anthony Yates\" and transaction_type = 'payment' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') ) " }, { "id": 3224, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 3225, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brandy Green\" ) " }, { "id": 3226, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 3227, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Maintenance and Repair\") and vendor = \"Johnathan Payne\"" }, { "id": 3228, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Child guidance services\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 3229, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Christopher Boyd\" ) " }, { "id": 3230, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 3231, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Cheryl Calderon\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 3232, "SQL": "select sum(credit) from master_txn_table where product_service = \"Memberships\" and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 3233, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Steven Mcbride\" ) " }, { "id": 3234, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 3235, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Steven Perez\" ) " }, { "id": 3236, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brandy Watson\" ) " }, { "id": 3237, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Tammy Davenport\" order by transaction_date limit 1" }, { "id": 3238, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Manuel King\" ) " }, { "id": 3239, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Stacy Vasquez\" ) " }, { "id": 3240, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Decks and Patios\") and vendor = \"Becky Bolton\"" }, { "id": 3241, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Juan Brady\" order by transaction_date limit 1" }, { "id": 3242, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Steve Morris\" ) " }, { "id": 3243, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Eric Wolf\" ) " }, { "id": 3244, "SQL": "select sum(credit) from master_txn_table where product_service = \"Window washing\" and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 3245, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Charlotte Flores\"" }, { "id": 3246, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 3247, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Amanda Alexander\" order by transaction_date limit 1" }, { "id": 3248, "SQL": "select sum(credit) from master_txn_table where product_service = \"Nonfossil-fuel\" and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 3249, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Rodney Sims\" and transaction_type = 'invoice'" }, { "id": 3250, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 3251, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 3252, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Gary Johnston\" ) " }, { "id": 3253, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 3254, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") group by product_service order by sum(credit) desc limit 1" }, { "id": 3255, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Dairy support services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 3256, "SQL": "select transaction_date from master_txn_table where customers = \"Scott Greene\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 3257, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 3258, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 3259, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Arthur Townsend' or vendor = 'Arthur Townsend'" }, { "id": 3260, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Karen Ramirez\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) )" }, { "id": 3261, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Jessica Russell\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) ) " }, { "id": 3262, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Michele Trujillo' or vendor = 'Michele Trujillo'" }, { "id": 3263, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 3264, "SQL": "select min(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 = \"Jennifer Hernandez\" and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 3265, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Katherine Flores MD\" order by transaction_date limit 1" }, { "id": 3266, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Stephanie Norman' or vendor = 'Stephanie Norman'" }, { "id": 3267, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Mark Williams\" ) " }, { "id": 3268, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Judith Cox\"" }, { "id": 3269, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Musicians\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 3270, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name 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 account_type in ('Expense','Other Expense') " }, { "id": 3271, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 3272, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 3273, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Bethany Monroe\" ) " }, { "id": 3274, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jennifer Mcgrath\" ) " }, { "id": 3275, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"General contracting\") and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 3276, "SQL": "select transaction_date from master_txn_table where customers = \"William Lewis\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 3277, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') group by billing_city" }, { "id": 3278, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Anna Lewis\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 3279, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Packing services for goods\") and 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') " }, { "id": 3280, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"James Anderson\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) )" }, { "id": 3281, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 3282, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Other non-renewable power generation\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 3283, "SQL": "select transaction_id from master_txn_table where product_service = \"Home office\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 3284, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 3285, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 3286, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 3287, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Debra Duncan\" ) " }, { "id": 3288, "SQL": "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,\"Computer Repairs\") and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 3289, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Travis Vazquez\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 3290, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)group by product_service order by sum(credit) desc limit 1" }, { "id": 3291, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 3292, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Keith Young\" ) " }, { "id": 3293, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 3294, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Patricia Williams\" ) " }, { "id": 3295, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 3296, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Retailing youth furniture\") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 3297, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 3298, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Recognition software for IT and telecommunications\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 3299, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Destiny Rivera\" and transaction_type = 'invoice'" }, { "id": 3300, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Kelli Berry\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 3301, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Carrie Kelly\" order by transaction_date limit 1" }, { "id": 3302, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Mark Valdez\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 3303, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"James Suarez\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 3304, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Danielle Lee\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 3305, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Transportation services\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 3306, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 3307, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brent Weaver\" ) " }, { "id": 3308, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jason Murray\" order by transaction_date limit 1" }, { "id": 3309, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Pamela Holt' or vendor = 'Pamela Holt'" }, { "id": 3310, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Spencer Moore\" ) " }, { "id": 3311, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jacqueline Lyons\" ) " }, { "id": 3312, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) group by billing_city" }, { "id": 3313, "SQL": "select transaction_id from master_txn_table where product_service = \"Home-care\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 3314, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 3315, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 3316, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Charlene Hughes\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) )" }, { "id": 3317, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 3318, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 3319, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Susan Taylor\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 3320, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Raymond Valenzuela\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') )" }, { "id": 3321, "SQL": "select transaction_date from master_txn_table where customers = \"Roberto Young\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 3322, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 3323, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Savings\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 3324, "SQL": "select transaction_id from master_txn_table where customers = \"Terri Horton\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 3325, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Samuel Sullivan DVM\" ) " }, { "id": 3326, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Baby strollers\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 3327, "SQL": "select transaction_id from master_txn_table where customers = \"Adam Thomas\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 3328, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name 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 account_type in ('Expense','Other Expense') " }, { "id": 3329, "SQL": "select transaction_date from master_txn_table where customers = \"Brandi Wheeler\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 3330, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Heather Ramirez\"" }, { "id": 3331, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 3332, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Thomas Richardson\" order by transaction_date limit 1" }, { "id": 3333, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 3334, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Amusement and recreation services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 3335, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 3336, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 3337, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Tara Cline DDS\" ) " }, { "id": 3338, "SQL": "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,\"Constructing townhouses\") and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 3339, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 3340, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Elizabeth Schultz\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 3341, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sarah Bowen\" ) " }, { "id": 3342, "SQL": "select transaction_id from master_txn_table where product_service = \"Contract\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 3343, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 3344, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Jenna Dawson\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 3345, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 3346, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 3347, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Advertising\") and vendor = \"Elizabeth Curtis\"" }, { "id": 3348, "SQL": "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,\"Job Materials\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 3349, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') 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') group by billing_city" }, { "id": 3350, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Timothy Davis\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 3351, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Catherine James\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) )" }, { "id": 3352, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Carrie Brooks\" ) " }, { "id": 3353, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 3354, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Aimee Bishop\"" }, { "id": 3355, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Courtney Harrell\" ) " }, { "id": 3356, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') group by billing_city" }, { "id": 3357, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 3358, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Kayla White\" order by transaction_date limit 1" }, { "id": 3359, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 3360, "SQL": "select transaction_date from master_txn_table where customers = \"Daisy Payne\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 3361, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 3362, "SQL": "select transaction_id from master_txn_table where product_service = \"Fluorocarbon gases\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 3363, "SQL": "select transaction_date from master_txn_table where customers = \"Justin Hamilton\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 3364, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 3365, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Alejandro Mueller\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 3366, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jermaine Orozco MD\"" }, { "id": 3367, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Nicholas Barnett\" ) " }, { "id": 3368, "SQL": "select transaction_date from master_txn_table where customers = \"Rachel Washington\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 3369, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Michael Lee\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 3370, "SQL": "select transaction_date from master_txn_table where customers = \"David Shelton\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 3371, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jamie Bradley\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 3372, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 3373, "SQL": "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,\"Coffee and snack shops\") and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 3374, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Paula Armstrong\"" }, { "id": 3375, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Robert Ramos\" ) " }, { "id": 3376, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Adam Lucero\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 3377, "SQL": "select transaction_id from master_txn_table where product_service = \"Industrial manufacturing\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 3378, "SQL": "select transaction_date from master_txn_table where customers = \"Roger Peterson\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 3379, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Dues & Subscriptions\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 3380, "SQL": "select avg(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 = \"Jenny Sanchez\" and 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') " }, { "id": 3381, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 3382, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Glen Bright' or vendor = 'Glen Bright'" }, { "id": 3383, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kelly Weeks\" ) " }, { "id": 3384, "SQL": "select transaction_id from master_txn_table where customers = \"Lori Lang\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 3385, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Laurie Mack\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 3386, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"John Erickson\" order by transaction_date limit 1" }, { "id": 3387, "SQL": "select transaction_date 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 = \"Car seats\" order by transaction_date asc limit 1 " }, { "id": 3388, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 3389, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Victoria White\" ) " }, { "id": 3390, "SQL": "select transaction_date from master_txn_table where customers = \"Anthony Berry\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 3391, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lindsey Powers\" ) " }, { "id": 3392, "SQL": "select transaction_id from master_txn_table where customers = \"Cristian Ward\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 3393, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Duct and gutter cleaning\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 3394, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 3395, "SQL": "select transaction_date from master_txn_table where customers = \"Madison Butler DVM\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 3396, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Mining machinery\" " }, { "id": 3397, "SQL": "select transaction_id from master_txn_table where customers = \"Paul Morrison\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 3398, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Food & drink\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 3399, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Tammie Garcia\" ) " }, { "id": 3400, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 3401, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Amy Mendoza\" ) " }, { "id": 3402, "SQL": "select transaction_id from master_txn_table where product_service = \"Adoption\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 3403, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Advertising\") and vendor = \"Michael Mendoza\"" }, { "id": 3404, "SQL": "select transaction_date from master_txn_table where customers = \"Sherri Grimes\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 3405, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Kenneth Esparza\"" }, { "id": 3406, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Joe Clayton\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 3407, "SQL": "select transaction_date 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 = \"Non-musical\" order by transaction_date asc limit 1 " }, { "id": 3408, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 3409, "SQL": "select transaction_date 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 = \"Chairs\" order by transaction_date asc limit 1 " }, { "id": 3410, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Michelle Garrett\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 3411, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Allison Harmon\" ) " }, { "id": 3412, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Brittany Mullen\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 3413, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Andrea Powell\" ) " }, { "id": 3414, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Golf equipment and supply retailing\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 3415, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Chimney sweep services\") and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 3416, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 3417, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 3418, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 3419, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"James Parker\" ) " }, { "id": 3420, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Erica Smith\" and account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 3421, "SQL": "select transaction_date from master_txn_table where customers = \"Jenny Robertson\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 3422, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 3423, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Lisa Wise\"" }, { "id": 3424, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Diapers\") and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 3425, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Stacy Stephenson DDS\" ) " }, { "id": 3426, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 3427, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Diapers\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 3428, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Dalton Todd\" ) " }, { "id": 3429, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Kendra Miller\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 3430, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 3431, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") group by billing_city" }, { "id": 3432, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 3433, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and 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') group by billing_city" }, { "id": 3434, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 3435, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by billing_city" }, { "id": 3436, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Brian Bond\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 3437, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 3438, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Rebecca Johnston\" ) " }, { "id": 3439, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 3440, "SQL": "select sum(credit) from master_txn_table where product_service = \"Fluorocarbon gases\" and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 3441, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Design\" " }, { "id": 3442, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 3443, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brandy Taylor\" ) " }, { "id": 3444, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kelly Wilcox\" ) " }, { "id": 3445, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Blake Robertson\" ) " }, { "id": 3446, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 3447, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 3448, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Benjamin Kim\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 3449, "SQL": "select sum(credit) from master_txn_table where product_service = \"Auto sector\" and 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') " }, { "id": 3450, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Wholesaling railroad cars\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 3451, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Tonya Freeman DDS\"" }, { "id": 3452, "SQL": "select transaction_date from master_txn_table where customers = \"Ashley Browning\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 3453, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 3454, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 3455, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') group by billing_city" }, { "id": 3456, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 3457, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Metal ore exploration\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 3458, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ronald Bradley\" ) " }, { "id": 3459, "SQL": "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,\"Retailing Wardrobe\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 3460, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Equipment Repairs\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 3461, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Bookkeeper\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 3462, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jennifer Herring\" ) " }, { "id": 3463, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Gary Johnston\" ) " }, { "id": 3464, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'David Davis' or vendor = 'David Davis'" }, { "id": 3465, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 3466, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 3467, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 3468, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 3469, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jacqueline Romero\" order by transaction_date limit 1" }, { "id": 3470, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Transportation services\") and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 3471, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 3472, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 3473, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Amanda Howard\" ) " }, { "id": 3474, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Scott Santos\" ) " }, { "id": 3475, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 3476, "SQL": "select max(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 = \"Jennifer Sutton DVM\" and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 3477, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 3478, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Mark Cortez\" ) " }, { "id": 3479, "SQL": "select transaction_date 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 = \"Appearances and speeches\" order by transaction_date asc limit 1 " }, { "id": 3480, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Henry Galvan\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 3481, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"golf instruction services\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 3482, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Paige Rodriguez\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") ) " }, { "id": 3483, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 3484, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Forestry Machinery\" " }, { "id": 3485, "SQL": "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,\"Non-musical performances\") 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') " }, { "id": 3486, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") group by billing_city" }, { "id": 3487, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') group by billing_city" }, { "id": 3488, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Justin Taylor\" ) " }, { "id": 3489, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 3490, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 3491, "SQL": "select avg(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 = \"Ryan Berry\" and 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') " }, { "id": 3492, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 3493, "SQL": "select transaction_date from master_txn_table where customers = \"Jacqueline Griffith\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 3494, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Kathleen Benjamin\" and transaction_type = 'invoice'" }, { "id": 3495, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Brian Crawford\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 3496, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') group by billing_city" }, { "id": 3497, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Justin Hines\" ) " }, { "id": 3498, "SQL": "select sum(credit) from master_txn_table where product_service = \"Swimming pool Cleaning\" and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 3499, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Golf equipment and supply retailing\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 3500, "SQL": "select max(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 = \"Eric Porter\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 3501, "SQL": "select transaction_date from master_txn_table where customers = \"Andrea Cobb\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 3502, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Local area network management training\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 3503, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"George Taylor\" order by transaction_date limit 1" }, { "id": 3504, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sabrina Bates\" ) " }, { "id": 3505, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and 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') " }, { "id": 3506, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Julie Nguyen\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 3507, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 3508, "SQL": "select transaction_date 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 = \"Medical services\" order by transaction_date asc limit 1 " }, { "id": 3509, "SQL": "select min(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 = \"Angela Hunter\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 3510, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Catherine Cunningham\"" }, { "id": 3511, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 3512, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Travis Johnson\" ) " }, { "id": 3513, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brandi Duncan DVM\" ) " }, { "id": 3514, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Renee Lopez\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') ) " }, { "id": 3515, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Chelsea Graham\" ) " }, { "id": 3516, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 3517, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Repair & Maintenance (deleted)\") and vendor = \"Sheila Russell\"" }, { "id": 3518, "SQL": "select transaction_date from master_txn_table where customers = \"Jeffrey Reyes\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 3519, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) group by billing_city" }, { "id": 3520, "SQL": "select transaction_date from master_txn_table where customers = \"Cynthia Watson\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 3521, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Kristen Skinner\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 3522, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Maintenance and Repair\") and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 3523, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Cynthia Dixon\" and transaction_type = 'payment' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') )" }, { "id": 3524, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kelly Vaughan\" ) " }, { "id": 3525, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Lauren Shelton\"" }, { "id": 3526, "SQL": "select max(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 = \"Patrick Hill\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 3527, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Stephanie Goodman MD\" order by transaction_date limit 1" }, { "id": 3528, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Teen outreach services\") 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') " }, { "id": 3529, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Bicycle retailing\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 3530, "SQL": "select sum(credit) from master_txn_table where product_service = \"Construction management\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 3531, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Stephanie Casey\" order by transaction_date limit 1" }, { "id": 3532, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Elizabeth Mcdowell\" ) " }, { "id": 3533, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Steven Farley\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) )" }, { "id": 3534, "SQL": "select transaction_date from master_txn_table where customers = \"Megan Landry\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 3535, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Holly Hawkins\" ) " }, { "id": 3536, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Joseph Newman\" ) " }, { "id": 3537, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 3538, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Karen Hudson\" ) " }, { "id": 3539, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Retailing formal dining furniture\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 3540, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Caleb Mitchell\" ) " }, { "id": 3541, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Amanda Hernandez\" ) " }, { "id": 3542, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Carla Fuller\" ) " }, { "id": 3543, "SQL": "select avg(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 = \"Patrick Sullivan\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 3544, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Cynthia Johnson\" and account_type in ('Expense','Other Expense') and 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') " }, { "id": 3545, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Providing freight car cleaning services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 3546, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 3547, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 3548, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Richard Oneal\" ) " }, { "id": 3549, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Heidi Berry\" order by transaction_date limit 1" }, { "id": 3550, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Sarah Dean' or vendor = 'Sarah Dean'" }, { "id": 3551, "SQL": "select transaction_date from master_txn_table where customers = \"Joshua Aguilar\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 3552, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 3553, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Daniel Carey' or vendor = 'Daniel Carey'" }, { "id": 3554, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 3555, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Jacob Salinas\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 3556, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Justin Wade\" ) " }, { "id": 3557, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Diapers\" " }, { "id": 3558, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Anne Smith\" ) " }, { "id": 3559, "SQL": "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,\"Retailing bedding\") and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 3560, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') group by billing_city" }, { "id": 3561, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Alyssa Barton\"" }, { "id": 3562, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Molly Harmon' or vendor = 'Molly Harmon'" }, { "id": 3563, "SQL": "select transaction_id from master_txn_table where customers = \"Adrian Simmons\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 3564, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 3565, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jennifer Barnes\" ) " }, { "id": 3566, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 3567, "SQL": "select transaction_id from master_txn_table where product_service = \"Fishing\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 3568, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Candice Cooper\"" }, { "id": 3569, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Business process management\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 3570, "SQL": "select min(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 = \"Lisa Miller\" and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 3571, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Gas and Electric\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 3572, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Providing courses through business schools\") and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 3573, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 3574, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Nina Atkins\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') )" }, { "id": 3575, "SQL": "select transaction_date 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 = \"Acetylene\" order by transaction_date asc limit 1 " }, { "id": 3576, "SQL": "select sum(credit) from master_txn_table where product_service = \"Rental\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 3577, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Christina Bradshaw' or vendor = 'Christina Bradshaw'" }, { "id": 3578, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kyle Watson\" ) " }, { "id": 3579, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Teen outreach\" " }, { "id": 3580, "SQL": "select transaction_date from master_txn_table where customers = \"Drew Thompson\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 3581, "SQL": "select transaction_id from master_txn_table where product_service = \"Wardrobe\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 3582, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Flowers\" " }, { "id": 3583, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 3584, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 3585, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lindsey Paul\" ) " }, { "id": 3586, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Kelli Snow\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') ) " }, { "id": 3587, "SQL": "select min(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 = \"Christian Hughes\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 3588, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Nicholas Barron\" and transaction_type = 'invoice'" }, { "id": 3589, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 3590, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Kenneth Rojas\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date) AND date(current_date) ) " }, { "id": 3591, "SQL": "select avg(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 = \"Christian Powers\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 3592, "SQL": "select product_service, 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 transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') group by product_service order by sum(credit) desc limit 1" }, { "id": 3593, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kristina Crawford\" ) " }, { "id": 3594, "SQL": "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,\"Retailing formal dining furniture\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 3595, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 3596, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Mia Gutierrez\" order by transaction_date limit 1" }, { "id": 3597, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Adrian Fischer\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 3598, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Mary Henderson\" ) " }, { "id": 3599, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Terri Lawson\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) )" }, { "id": 3600, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') group by product_service order by sum(credit) desc limit 1" }, { "id": 3601, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Patricia Walker\" ) " }, { "id": 3602, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 3603, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Child guidance services\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 3604, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Kiara Williams\"" }, { "id": 3605, "SQL": "select transaction_date from master_txn_table where customers = \"Valerie Evans\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 3606, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 3607, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Lucas Norman\" order by transaction_date limit 1" }, { "id": 3608, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Jennifer Li\"" }, { "id": 3609, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 3610, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Adam Pena\" ) " }, { "id": 3611, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Aircraft Engines\" " }, { "id": 3612, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Jerry Stanley' or vendor = 'Jerry Stanley'" }, { "id": 3613, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Stephanie Foster\" ) " }, { "id": 3614, "SQL": "select sum(credit) from master_txn_table where product_service = \"Securities\" and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 3615, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Krista Jones\" ) " }, { "id": 3616, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Tracey Jackson\" order by transaction_date limit 1" }, { "id": 3617, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 3618, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Manuel Cooper\"" }, { "id": 3619, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 3620, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Matthew Santos\" ) " }, { "id": 3621, "SQL": "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,\"Baby clothing and footwear\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 3622, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 3623, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 3624, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Meredith Bentley\" and transaction_type = 'invoice'" }, { "id": 3625, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Colleen Ryan\" ) " }, { "id": 3626, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Heather Pratt\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 3627, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ian Francis\" ) " }, { "id": 3628, "SQL": "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,\"Retailing Sleepers\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 3629, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 3630, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 3631, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Matthew Serrano\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 3632, "SQL": "select min(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 = \"Latasha Lewis\" and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 3633, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 3634, "SQL": "select transaction_id from master_txn_table where customers = \"Phillip Smith\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 3635, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Adrienne Torres\" order by transaction_date limit 1" }, { "id": 3636, "SQL": "select transaction_id from master_txn_table where customers = \"Courtney Stone\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 3637, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jason Bentley\" ) " }, { "id": 3638, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Mark Cummings\" order by transaction_date limit 1" }, { "id": 3639, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Emily Bennett\" order by transaction_date limit 1" }, { "id": 3640, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Anna Preston\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 3641, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Ralph Moore\"" }, { "id": 3642, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 3643, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 3644, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 3645, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Equipment Repairs\") and vendor = \"John Stein\"" }, { "id": 3646, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Coordinators\" " }, { "id": 3647, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Mining machinery and equipment rental or leasing\") and 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') " }, { "id": 3648, "SQL": "select transaction_date from master_txn_table where customers = \"Danielle Knapp\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 3649, "SQL": "select transaction_date from master_txn_table where customers = \"Alexandra Bradshaw\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 3650, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Nonmetallic mineral ore exploration\") and 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') " }, { "id": 3651, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Erik Cobb\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 3652, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Emily Sandoval\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) )" }, { "id": 3653, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Wholesaling railroad cars\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 3654, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and 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') order by sum(debit) desc limit 1" }, { "id": 3655, "SQL": "select sum(credit) from master_txn_table where product_service = \"Securities\" and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 3656, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') group by billing_city" }, { "id": 3657, "SQL": "select transaction_date from master_txn_table where customers = \"Jeanne Burke\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 3658, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Kathryn Mccann\" and account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 3659, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where 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') and account_type in ('Expense','Other Expense') " }, { "id": 3660, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 3661, "SQL": "select sum(credit) from master_txn_table where product_service = \"Macs\" and 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') " }, { "id": 3662, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 3663, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Misty Torres\" ) " }, { "id": 3664, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Amusement and recreation services\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 3665, "SQL": "select transaction_id from master_txn_table where product_service = \"Training\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 3666, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jason Camacho\" order by transaction_date limit 1" }, { "id": 3667, "SQL": "select transaction_id from master_txn_table where customers = \"Joshua Dorsey\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 3668, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 3669, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 3670, "SQL": "select transaction_date from master_txn_table where customers = \"Christine Martin\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 3671, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Jordan Jones\"" }, { "id": 3672, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Anthony Carter\" ) " }, { "id": 3673, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Breanna Smith\"" }, { "id": 3674, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kimberly Mcclain\" ) " }, { "id": 3675, "SQL": "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 peppermint oil\") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 3676, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 3677, "SQL": "select transaction_date 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 = \"Accessories\" order by transaction_date asc limit 1 " }, { "id": 3678, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 3679, "SQL": "select transaction_id from master_txn_table where product_service = \"Catering\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 3680, "SQL": "select transaction_date 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 = \"Fast food\" order by transaction_date asc limit 1 " }, { "id": 3681, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 3682, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Anthony Olsen\" ) " }, { "id": 3683, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jacob Sutton\" ) " }, { "id": 3684, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 3685, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"James Roman\" ) " }, { "id": 3686, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') 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') group by billing_city" }, { "id": 3687, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Joshua Bowen\" and transaction_type = 'invoice'" }, { "id": 3688, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Macro\" " }, { "id": 3689, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 3690, "SQL": "select avg(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 = \"Alexis Martin\" and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 3691, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") order by sum(debit) desc limit 1" }, { "id": 3692, "SQL": "select transaction_id from master_txn_table where product_service = \"Sleepers\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 3693, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Meghan Clements' or vendor = 'Meghan Clements'" }, { "id": 3694, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 3695, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') group by billing_city" }, { "id": 3696, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 3697, "SQL": "select max(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 = \"Mckenzie Kent\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 3698, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 3699, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lisa Hartman\" ) " }, { "id": 3700, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Elizabeth Gutierrez\" ) " }, { "id": 3701, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Taylor Dominguez\"" }, { "id": 3702, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Matthew Benjamin\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) )" }, { "id": 3703, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Nathaniel Miller\" and transaction_type = 'invoice'" }, { "id": 3704, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 3705, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Danny Jackson\" order by transaction_date limit 1" }, { "id": 3706, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"David Parker\" ) " }, { "id": 3707, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Shearing\" " }, { "id": 3708, "SQL": "select transaction_date 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 = \"Exercise\" order by transaction_date asc limit 1 " }, { "id": 3709, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') group by billing_city" }, { "id": 3710, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"James Burke\" ) " }, { "id": 3711, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Design and management services \") and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 3712, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sharon Smith\" ) " }, { "id": 3713, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Suzanne Cox\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 3714, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Jonathan Galvan PhD\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 3715, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 3716, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 3717, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Dale Hayes\" ) " }, { "id": 3718, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"James Ruiz\" ) " }, { "id": 3719, "SQL": "select transaction_date 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 = \"Repair\" order by transaction_date asc limit 1 " }, { "id": 3720, "SQL": "select transaction_id from master_txn_table where customers = \"Julia Olson\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 3721, "SQL": "select min(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 = \"Loretta Chung\" and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 3722, "SQL": "select transaction_id from master_txn_table where product_service = \"LAN\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 3723, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Andrew Hicks\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') ) " }, { "id": 3724, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 3725, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Nathaniel Jacobson\" ) " }, { "id": 3726, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 3727, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Meal services\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 3728, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 3729, "SQL": "select max(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 = \"Jacqueline Ingram\" and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 3730, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Seth Williams\" ) " }, { "id": 3731, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 3732, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Sheila Black\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 3733, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Alexander Cole\" ) " }, { "id": 3734, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Benjamin Gonzales\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 3735, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Donald Mitchell\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') ) " }, { "id": 3736, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 3737, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Equipment Rental\") and vendor = \"Christopher Daniels\"" }, { "id": 3738, "SQL": "select avg(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 = \"Thomas Patterson\" and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 3739, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 3740, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Industrial manufacturing\") and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 3741, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Kurt Parker\" and transaction_type = 'payment' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') )" }, { "id": 3742, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Walter Grant\" ) " }, { "id": 3743, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Jessica Fernandez\"" }, { "id": 3744, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 3745, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"James Berg\" ) " }, { "id": 3746, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Attire and accessories\") and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 3747, "SQL": "select transaction_id from master_txn_table where product_service = \"Biomass electricity\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 3748, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Natalie Robinson\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 3749, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jacqueline Vaughn\" ) " }, { "id": 3750, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 3751, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 3752, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 3753, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Robert Lang\" ) " }, { "id": 3754, "SQL": "select sum(credit) from master_txn_table where product_service = \"Wells\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 3755, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Paige Webb' or vendor = 'Paige Webb'" }, { "id": 3756, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 3757, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 3758, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Connie Shaw\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) )" }, { "id": 3759, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Tyler Oneill\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') )" }, { "id": 3760, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Samantha Blanchard\" ) " }, { "id": 3761, "SQL": "select sum(credit) from master_txn_table where product_service = \"Loading and unloading\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 3762, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 3763, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') and account_type in ('Expense','Other Expense') " }, { "id": 3764, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Victor Chase\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") )" }, { "id": 3765, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Design\" " }, { "id": 3766, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lisa Salinas\" ) " }, { "id": 3767, "SQL": "select min(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 = \"Alisha Flores\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 3768, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") and account_type in ('Expense','Other Expense') " }, { "id": 3769, "SQL": "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,\"Recognition software for government and legal purposes\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 3770, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') group by billing_city" }, { "id": 3771, "SQL": "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,\"Quality management accreditation\") and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 3772, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Kristina Lewis\" and transaction_type = 'invoice'" }, { "id": 3773, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 3774, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 3775, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Web hosting\") and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 3776, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Brandon Powell\"" }, { "id": 3777, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Thomas Perkins\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 3778, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Motorbike \") and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 3779, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Bedding\" " }, { "id": 3780, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where 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') and account_type in ('Expense','Other Expense') " }, { "id": 3781, "SQL": "select max(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 = \"Chris Gibbs\" and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 3782, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 3783, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Wendy Drake\" ) " }, { "id": 3784, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Christopher Thornton' or vendor = 'Christopher Thornton'" }, { "id": 3785, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Maria Fisher\" ) " }, { "id": 3786, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Offering equity long/short \") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 3787, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Cementing wells\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 3788, "SQL": "select transaction_date from master_txn_table where customers = \"Priscilla White\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 3789, "SQL": "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,\"Geothermal-fueled power generation\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 3790, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Russell Williams\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 3791, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 3792, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 3793, "SQL": "select transaction_id from master_txn_table where product_service = \"Window washing\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 3794, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Daniel Thomas\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 3795, "SQL": "select transaction_date 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 = \"Bars and Nightclubs\" order by transaction_date asc limit 1 " }, { "id": 3796, "SQL": "select max(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 = \"Zachary Mitchell\" and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 3797, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 3798, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Development of software products for mobile devices\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 3799, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Carbon dioxide manufacturing\") and 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') " }, { "id": 3800, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 3801, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lindsay Allen\" ) " }, { "id": 3802, "SQL": "select transaction_date from master_txn_table where customers = \"Angela Bryant\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 3803, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") group by product_service order by sum(credit) desc limit 1" }, { "id": 3804, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Cheryl King\" ) " }, { "id": 3805, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 3806, "SQL": "select transaction_date 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 = \"Boarding\" order by transaction_date asc limit 1 " }, { "id": 3807, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Offering distressed securities funds\") and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 3808, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Kimberly Williams' or vendor = 'Kimberly Williams'" }, { "id": 3809, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"David Franco\"" }, { "id": 3810, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Gary Brooks\" ) " }, { "id": 3811, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Allen Hunt\" ) " }, { "id": 3812, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Elizabeth Cuevas MD\" ) " }, { "id": 3813, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Jennifer Walker\"" }, { "id": 3814, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Hydroelectric power generation\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 3815, "SQL": "select transaction_date from master_txn_table where customers = \"Robert Walker\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 3816, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Edward Jones\" order by transaction_date limit 1" }, { "id": 3817, "SQL": "select sum(credit) from master_txn_table where product_service = \"Diapers\" and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 3818, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Application service provisioning\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 3819, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Youth community center services\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 3820, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 3821, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Roy Jones\" ) " }, { "id": 3822, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 3823, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ricky Blake\" ) " }, { "id": 3824, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Kathryn Mccann\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 3825, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Casings, Tubes and Rods\" " }, { "id": 3826, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 3827, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 3828, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 3829, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Waste-fueled\" " }, { "id": 3830, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Seth Aguilar\" ) " }, { "id": 3831, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 3832, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Richard Vasquez\" ) " }, { "id": 3833, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 3834, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 3835, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Vickie Hancock\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 3836, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Kara Watson\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') )" }, { "id": 3837, "SQL": "select transaction_date from master_txn_table where customers = \"Katherine Harrell\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 3838, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Michelle Edwards' or vendor = 'Michelle Edwards'" }, { "id": 3839, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Carla Scott\" and transaction_type = 'invoice'" }, { "id": 3840, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sara Turner\" ) " }, { "id": 3841, "SQL": "select transaction_id from master_txn_table where customers = \"Patrick Tran IV\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 3842, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Angelica Baker\" ) " }, { "id": 3843, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jay Cook\" ) " }, { "id": 3844, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 3845, "SQL": "select transaction_date from master_txn_table where customers = \"Linda Fuller\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 3846, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") group by product_service order by sum(credit) desc limit 1" }, { "id": 3847, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Equipment Rental\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 3848, "SQL": "select sum(credit) from master_txn_table where product_service = \"Exercise\" and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 3849, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Jessica Delgado\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 3850, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Dwayne Santos\" and transaction_type = 'invoice'" }, { "id": 3851, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 3852, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Fluorocarbon gases manufacturing\") and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 3853, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Elizabeth Beard\" order by transaction_date limit 1" }, { "id": 3854, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Vanessa Davila\" ) " }, { "id": 3855, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 3856, "SQL": "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,\"Saddlery retailing\") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 3857, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Charles Mendoza\" ) " }, { "id": 3858, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 3859, "SQL": "select transaction_date from master_txn_table where customers = \"Roger Proctor\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 3860, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Diana Fox\" ) " }, { "id": 3861, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 3862, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Equipment Rental\") and vendor = \"Kevin Bell\"" }, { "id": 3863, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 3864, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Sharon Taylor\" order by transaction_date limit 1" }, { "id": 3865, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 3866, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 3867, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 3868, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Hydroelectric electricity\" " }, { "id": 3869, "SQL": "select transaction_date from master_txn_table where customers = \"Lauren Bradford\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 3870, "SQL": "select transaction_date from master_txn_table where customers = \"Charles Bates\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 3871, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Ethan Morgan\"" }, { "id": 3872, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Richard Stewart\" ) " }, { "id": 3873, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Justin Blanchard\"" }, { "id": 3874, "SQL": "select transaction_id from master_txn_table where customers = \"Rachel Jones\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 3875, "SQL": "select transaction_date from master_txn_table where customers = \"Gregory Dillon\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 3876, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Tanya Strickland\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 3877, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Russell Scott\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') )" }, { "id": 3878, "SQL": "select min(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 = \"Derrick Krueger\" and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 3879, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Eric Pennington\" ) " }, { "id": 3880, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 3881, "SQL": "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 = \"Michele Reyes\" and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 3882, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 3883, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Providing trust and fiduciary services\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 3884, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 3885, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Tamara Martin\" order by transaction_date limit 1" }, { "id": 3886, "SQL": "select transaction_id from master_txn_table where product_service = \"Coffee and Snack\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 3887, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Norman Davis\" order by transaction_date limit 1" }, { "id": 3888, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Paul Jimenez\" ) " }, { "id": 3889, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 3890, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 3891, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 3892, "SQL": "select sum(credit) from master_txn_table where product_service = \"Duplexes\" and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 3893, "SQL": "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 = \"Laura Berry\" and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 3894, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Jeffrey Cruz\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 3895, "SQL": "select transaction_id from master_txn_table where product_service = \"Coal Pwer\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 3896, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 3897, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Alicia Lopez\" ) " }, { "id": 3898, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"John Johnson\" ) " }, { "id": 3899, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 3900, "SQL": "select transaction_date from master_txn_table where customers = \"Kelsey Hunt\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 3901, "SQL": "select max(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 = \"Jane Porter\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 3902, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Application hosting\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 3903, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 3904, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Zoe Gordon\" ) " }, { "id": 3905, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 3906, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Andrew Chandler\" ) " }, { "id": 3907, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Tyler Case\" ) " }, { "id": 3908, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 3909, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Daniel Gutierrez\" order by transaction_date limit 1" }, { "id": 3910, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 3911, "SQL": "select transaction_date from master_txn_table where customers = \"Maria Jenkins\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 3912, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Maria Hopkins\" ) " }, { "id": 3913, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Amanda Baker\"" }, { "id": 3914, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Memberships\" " }, { "id": 3915, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Janet Carter\" ) " }, { "id": 3916, "SQL": "select transaction_date from master_txn_table where customers = \"Catherine Chan\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 3917, "SQL": "select transaction_date from master_txn_table where customers = \"Laura Gordon\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 3918, "SQL": "select transaction_date 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 = \"Copying\" order by transaction_date asc limit 1 " }, { "id": 3919, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by billing_city" }, { "id": 3920, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 3921, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Reginald Fisher\" order by transaction_date limit 1" }, { "id": 3922, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 3923, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Linda Phillips\" ) " }, { "id": 3924, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 3925, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Amanda Hill' or vendor = 'Amanda Hill'" }, { "id": 3926, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 3927, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 3928, "SQL": "select transaction_date from master_txn_table where customers = \"Carlos Murphy\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 3929, "SQL": "select transaction_date from master_txn_table where customers = \"Frances David\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 3930, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Jason Nelson' or vendor = 'Jason Nelson'" }, { "id": 3931, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Installation\") and vendor = \"Raymond Bowers\"" }, { "id": 3932, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 3933, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 3934, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"William Jimenez\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 3935, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Angela Keller\" order by transaction_date limit 1" }, { "id": 3936, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Diapers\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 3937, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 3938, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Insurance\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 3939, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 3940, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"David Vance\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 3941, "SQL": "select product_service, 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 transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') group by product_service order by sum(credit) desc limit 1" }, { "id": 3942, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 3943, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 3944, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 3945, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 3946, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Douglas Mendoza\" and transaction_type = 'payment' 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') )" }, { "id": 3947, "SQL": "select transaction_date from master_txn_table where customers = \"Kyle Olson\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 3948, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Rachel Hall\" ) " }, { "id": 3949, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date) AND date(current_date) group by billing_city" }, { "id": 3950, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Maintenance and Repair\") and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 3951, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Helen Reyes\"" }, { "id": 3952, "SQL": "select min(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 = \"Fernando Trevino\" and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 3953, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Vincent Rodriguez MD\" ) " }, { "id": 3954, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Donna Gonzalez\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 3955, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Andrew Moss\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 3956, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Home therapy services\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 3957, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 3958, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Phyllis Church' or vendor = 'Phyllis Church'" }, { "id": 3959, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') group by billing_city" }, { "id": 3960, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 3961, "SQL": "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,\"Farrier services\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 3962, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Darrell Rivera\" ) " }, { "id": 3963, "SQL": "select transaction_id from master_txn_table where product_service = \"Well casings\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 3964, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Tanya Lamb\" ) " }, { "id": 3965, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date) AND date(current_date) group by billing_city" }, { "id": 3966, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Other Services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 3967, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ashley Marshall\" ) " }, { "id": 3968, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' 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') " }, { "id": 3969, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Sheila Garrett\"" }, { "id": 3970, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Eddie Mejia\" order by transaction_date limit 1" }, { "id": 3971, "SQL": "select sum(credit) from master_txn_table where product_service = \"Boat\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 3972, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Douglas Berry\" order by transaction_date limit 1" }, { "id": 3973, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 3974, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"James Mccullough\" ) " }, { "id": 3975, "SQL": "select transaction_id from master_txn_table where product_service = \"Coal\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 3976, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 3977, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jose Stewart\" order by transaction_date limit 1" }, { "id": 3978, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Carol Pope' or vendor = 'Carol Pope'" }, { "id": 3979, "SQL": "select transaction_id from master_txn_table where product_service = \"Non-musical\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 3980, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Jessica Moore\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 3981, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Lisa Hardin\"" }, { "id": 3982, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Alison Brown\" ) " }, { "id": 3983, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Coin operated games and rides\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 3984, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 3985, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 3986, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Constructing apartment complexes\") and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 3987, "SQL": "select transaction_id from master_txn_table where customers = \"Kimberly Dean\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 3988, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Ross Thompson\" order by transaction_date limit 1" }, { "id": 3989, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Brian Rowe\"" }, { "id": 3990, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Fast food restaurants\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 3991, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 3992, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 3993, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 3994, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Allison Alexander\" ) " }, { "id": 3995, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"John Peters\" ) " }, { "id": 3996, "SQL": "select transaction_date from master_txn_table where customers = \"Seth Martinez\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 3997, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 3998, "SQL": "select transaction_date 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 = \"LAN\" order by transaction_date asc limit 1 " }, { "id": 3999, "SQL": "select transaction_date from master_txn_table where customers = \"Noah Wallace\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 4000, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Allen Vaughn\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') ) " }, { "id": 4001, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Charles Chen\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 4002, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 4003, "SQL": "select distinct transaction_id from master_txn_table where customers = \"David Haynes\"" }, { "id": 4004, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 4005, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Mary Vasquez\" order by transaction_date limit 1" }, { "id": 4006, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Richard Flynn\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') )" }, { "id": 4007, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"William Davidson\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') ) " }, { "id": 4008, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Taxes & Licenses\") and vendor = \"Darryl Castillo\"" }, { "id": 4009, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Charles Castro\" ) " }, { "id": 4010, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kimberly Ware\" ) " }, { "id": 4011, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jonathan Nelson\" ) " }, { "id": 4012, "SQL": "select transaction_date from master_txn_table where customers = \"Ashley Harrison\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 4013, "SQL": "select transaction_date from master_txn_table where customers = \"Hannah Preston\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 4014, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 4015, "SQL": "select avg(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 = \"Timothy Gonzalez\" and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 4016, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Cynthia Holland\" ) " }, { "id": 4017, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jennifer Fleming\" order by transaction_date limit 1" }, { "id": 4018, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by billing_city" }, { "id": 4019, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Melissa Andrews\" ) " }, { "id": 4020, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Rental Services\") and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 4021, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"William Mcfarland\"" }, { "id": 4022, "SQL": "select transaction_id from master_txn_table where customers = \"Michelle Best\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 4023, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 4024, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 4025, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) group by billing_city" }, { "id": 4026, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Erin Bell\" ) " }, { "id": 4027, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Maria Pittman\" ) " }, { "id": 4028, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Peter Medina\" ) " }, { "id": 4029, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Adrian Baird\" ) " }, { "id": 4030, "SQL": "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,\"Hydrogen manufacturing\") and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 4031, "SQL": "select transaction_date 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 = \"Chimney sweep services\" order by transaction_date asc limit 1 " }, { "id": 4032, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 4033, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Katherine Mcbride\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 4034, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 4035, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 4036, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kristen Tanner\" ) " }, { "id": 4037, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"William Elliott\" ) " }, { "id": 4038, "SQL": "select min(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 = \"Margaret Webb\" and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 4039, "SQL": "select transaction_date from master_txn_table where customers = \"Debra Mitchell\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 4040, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Thomas Jackson\" ) " }, { "id": 4041, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 4042, "SQL": "select avg(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 = \"Bianca Mann\" and 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') " }, { "id": 4043, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Heather Gonzalez\" ) " }, { "id": 4044, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sean Stevens\" ) " }, { "id": 4045, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 4046, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 4047, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 4048, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Matthew Kirby\" and transaction_type = 'payment' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') )" }, { "id": 4049, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Automobile\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 4050, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 4051, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 4052, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Joel Nicholson\" ) " }, { "id": 4053, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Robert Yoder\" ) " }, { "id": 4054, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Bryan Shaw\" order by transaction_date limit 1" }, { "id": 4055, "SQL": "select transaction_id from master_txn_table where product_service = \"Wind power\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 4056, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Whitney Farrell\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) )" }, { "id": 4057, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Tiffany Diaz\" ) " }, { "id": 4058, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Vickie Anderson\" ) " }, { "id": 4059, "SQL": "select transaction_date from master_txn_table where customers = \"Robert Whitaker\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 4060, "SQL": "select transaction_id from master_txn_table where customers = \"Thomas Lawson\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 4061, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Julie Hardy\"" }, { "id": 4062, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 4063, "SQL": "select transaction_date 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 = \"Strollers\" order by transaction_date asc limit 1 " }, { "id": 4064, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 4065, "SQL": "select transaction_id from master_txn_table where product_service = \"Youth community\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 4066, "SQL": "select max(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 = \"Chase Jackson\" and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 4067, "SQL": "select transaction_date from master_txn_table where customers = \"Jackie Jefferson\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 4068, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 4069, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Dues & Subscriptions\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 4070, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kristy Gregory\" ) " }, { "id": 4071, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Kristin Armstrong' or vendor = 'Kristin Armstrong'" }, { "id": 4072, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Christine Huber DVM\" ) " }, { "id": 4073, "SQL": "select transaction_date from master_txn_table where customers = \"Patricia Mcgee\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 4074, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Yvette Martinez\" ) " }, { "id": 4075, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Karen Turner\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') )" }, { "id": 4076, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Sara Beck\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') ) " }, { "id": 4077, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"April Yoder\" ) " }, { "id": 4078, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 4079, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Elizabeth Hooper' or vendor = 'Elizabeth Hooper'" }, { "id": 4080, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kyle Mcconnell\" ) " }, { "id": 4081, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 4082, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Peter Phelps\" ) " }, { "id": 4083, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Spearmint oil\" " }, { "id": 4084, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Jennifer Ward\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') )" }, { "id": 4085, "SQL": "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,\"Oxygen manufacturing\") and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 4086, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Justin Wade\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 4087, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Michael Morrison\" ) " }, { "id": 4088, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jason Holt\" ) " }, { "id": 4089, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 4090, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Joshua Burns\" ) " }, { "id": 4091, "SQL": "select product_service, 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 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') group by product_service order by sum(credit) desc limit 1" }, { "id": 4092, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 4093, "SQL": "select transaction_date from master_txn_table where customers = \"Nancy Garcia\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 4094, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Katherine Pittman\" ) " }, { "id": 4095, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 4096, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 4097, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lauren Frye\" ) " }, { "id": 4098, "SQL": "select min(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 = \"Linda Thomas\" 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') " }, { "id": 4099, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Robert Gillespie' or vendor = 'Robert Gillespie'" }, { "id": 4100, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Danny Young\" order by transaction_date limit 1" }, { "id": 4101, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 4102, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brittany Davidson\" ) " }, { "id": 4103, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Shawn Baker\"" }, { "id": 4104, "SQL": "select transaction_date from master_txn_table where customers = \"Dustin Hall\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 4105, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Margaret Hunt\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 4106, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Julia Oconnor\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 4107, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Richard Morgan\"" }, { "id": 4108, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 4109, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 4110, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Andrew Larsen\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) )" }, { "id": 4111, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Utilities\") and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 4112, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Daniel Gilbert\" ) " }, { "id": 4113, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jill Walker\" ) " }, { "id": 4114, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 4115, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 4116, "SQL": "select transaction_date 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 = \"Financial Planning\" order by transaction_date asc limit 1 " }, { "id": 4117, "SQL": "select transaction_id from master_txn_table where product_service = \"Inorganic Gases\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 4118, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Home therapy services\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 4119, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by billing_city" }, { "id": 4120, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') group by billing_city" }, { "id": 4121, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Amanda Thompson\" order by transaction_date limit 1" }, { "id": 4122, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Karla Boyd\" and account_type in ('Expense','Other Expense') and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 4123, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 4124, "SQL": "select transaction_date from master_txn_table where customers = \"Matthew Arellano\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 4125, "SQL": "select transaction_date 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 = \"Environmental impact assessment\" order by transaction_date asc limit 1 " }, { "id": 4126, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 4127, "SQL": "select transaction_id from master_txn_table where customers = \"Nathan Bernard\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 4128, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Child abuse prevention services\") and 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') " }, { "id": 4129, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by billing_city" }, { "id": 4130, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounting\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 4131, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 4132, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Casey Anderson\"" }, { "id": 4133, "SQL": "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,\"Document copying services\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 4134, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Michael Davis\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 4135, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Michael Lopez\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 4136, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Beverly Parker\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 4137, "SQL": "select sum(credit) from master_txn_table where product_service = \"Multi-strategy\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 4138, "SQL": "select sum(credit) from master_txn_table where product_service = \"Home office\" and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 4139, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 4140, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Robert Rivas\"" }, { "id": 4141, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Danielle Lewis\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 4142, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Amanda Owens\" ) " }, { "id": 4143, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"David Norton\" ) " }, { "id": 4144, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Annette Peterson' or vendor = 'Annette Peterson'" }, { "id": 4145, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jennifer Phillips PhD\" order by transaction_date limit 1" }, { "id": 4146, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Frank Brooks\" ) " }, { "id": 4147, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Nicholas Anderson\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 4148, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 4149, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Alicia Perez\" ) " }, { "id": 4150, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Constructing multiunit special-needs complexes\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 4151, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Teresa Lopez\" and transaction_type = 'invoice'" }, { "id": 4152, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Misty Martin\" ) " }, { "id": 4153, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Toni Anthony\" ) " }, { "id": 4154, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Trevor Nelson\" ) " }, { "id": 4155, "SQL": "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,\"Coordinators\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 4156, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Jeremiah Hall\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 4157, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Samantha Scott\" ) " }, { "id": 4158, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 4159, "SQL": "select transaction_date 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 = \"Financial Planning\" order by transaction_date asc limit 1 " }, { "id": 4160, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Justin Brown\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 4161, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Providing 24-hour home care\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 4162, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 4163, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 4164, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Brandy Martinez\" order by transaction_date limit 1" }, { "id": 4165, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Stephen Cole\" ) " }, { "id": 4166, "SQL": "select transaction_date from master_txn_table where customers = \"William Cabrera\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 4167, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Ian Smith\" and transaction_type = 'invoice'" }, { "id": 4168, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jennifer Cameron\" ) " }, { "id": 4169, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Pool maintenance\") and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 4170, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Aircraft rental or leasing\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 4171, "SQL": "select transaction_date from master_txn_table where customers = \"Daniel Pearson\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 4172, "SQL": "select sum(credit) from master_txn_table where product_service = \"Dietary and Nutritional\" and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 4173, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Amanda Galvan\" ) " }, { "id": 4174, "SQL": "select transaction_id from master_txn_table where customers = \"Scott Spencer\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 4175, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Kyle Phillips\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') ) " }, { "id": 4176, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Heidi Edwards\" ) " }, { "id": 4177, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Foster care placement services\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 4178, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 4179, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Cindy Joseph\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) ) " }, { "id": 4180, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Emily Blackwell\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) ) " }, { "id": 4181, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 4182, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Aeronautical Equipment\" " }, { "id": 4183, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Patrick Jones\"" }, { "id": 4184, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Valerie Herrera\" ) " }, { "id": 4185, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 4186, "SQL": "select transaction_date from master_txn_table where customers = \"Cody Kelly\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 4187, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Donna Black\" ) " }, { "id": 4188, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jacqueline Robertson\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 4189, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Rachael Townsend\" ) " }, { "id": 4190, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 4191, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 4192, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Laura Perez\" ) " }, { "id": 4193, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Fixed income\" " }, { "id": 4194, "SQL": "select transaction_date 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 = \"Barge\" order by transaction_date asc limit 1 " }, { "id": 4195, "SQL": "select transaction_date 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 = \"Townhouses\" order by transaction_date asc limit 1 " }, { "id": 4196, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") order by sum(debit) desc limit 1" }, { "id": 4197, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 4198, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 4199, "SQL": "select transaction_id from master_txn_table where customers = \"John Kennedy\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 4200, "SQL": "select sum(credit) from master_txn_table where product_service = \"Medication\" and 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') " }, { "id": 4201, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Micheal Castro\" order by transaction_date limit 1" }, { "id": 4202, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Steven Carter\" and transaction_type = 'invoice'" }, { "id": 4203, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Sheri Acevedo\"" }, { "id": 4204, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Carriers\" " }, { "id": 4205, "SQL": "select transaction_date 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 = \"Biomass electricity\" order by transaction_date asc limit 1 " }, { "id": 4206, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Jonathan Richard\"" }, { "id": 4207, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date) AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 4208, "SQL": "select transaction_id from master_txn_table where customers = \"Jacqueline Lewis\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 4209, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Phillip White\" order by transaction_date limit 1" }, { "id": 4210, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 4211, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 4212, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Brett Moore\" and transaction_type = 'invoice'" }, { "id": 4213, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 4214, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Equipment Repairs\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 4215, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 4216, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 4217, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Melanie Crawford\" ) " }, { "id": 4218, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Jeffrey Fitzpatrick\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 4219, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 4220, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Toni Boyd\" ) " }, { "id": 4221, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jaime Dickerson\" ) " }, { "id": 4222, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 4223, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Renee Valdez\" ) " }, { "id": 4224, "SQL": "select transaction_date from master_txn_table where customers = \"Theodore Blake\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 4225, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Amy Hurst\" ) " }, { "id": 4226, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Nathan Short\" ) " }, { "id": 4227, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Sean Smith\" order by transaction_date limit 1" }, { "id": 4228, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Nicholas Crawford\" ) " }, { "id": 4229, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Telephone\") and vendor = \"Nancy Erickson\"" }, { "id": 4230, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Ashley Harrison\"" }, { "id": 4231, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Mary Hubbard\" order by transaction_date limit 1" }, { "id": 4232, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Timothy Allen\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') ) " }, { "id": 4233, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Gregory Walker\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 4234, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Lisa Hatfield\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') ) " }, { "id": 4235, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 4236, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Joy Colon\"" }, { "id": 4237, "SQL": "select product_service, 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 transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') group by product_service order by sum(credit) desc limit 1" }, { "id": 4238, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Christine Lucas\" order by transaction_date limit 1" }, { "id": 4239, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Joshua Reid\" order by transaction_date limit 1" }, { "id": 4240, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Purchases\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 4241, "SQL": "select transaction_id from master_txn_table where customers = \"Jody Hodge\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 4242, "SQL": "select transaction_date from master_txn_table where customers = \"Charlotte Hughes\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 4243, "SQL": "select transaction_date from master_txn_table where customers = \"Joann Kelly DVM\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 4244, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Heidi Lee\"" }, { "id": 4245, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 4246, "SQL": "select transaction_date from master_txn_table where customers = \"Yolanda Willis\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 4247, "SQL": "select sum(credit) from master_txn_table where product_service = \"Construction Projects\" and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 4248, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Brian Hubbard DDS\" and transaction_type = 'invoice'" }, { "id": 4249, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 4250, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' 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') " }, { "id": 4251, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Eric Wilkerson\" ) " }, { "id": 4252, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Kristin Bryant\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 4253, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Timothy Powell\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 4254, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Brittany Hall\" order by transaction_date limit 1" }, { "id": 4255, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Martin Campbell\" ) " }, { "id": 4256, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Christina Ward\" order by transaction_date limit 1" }, { "id": 4257, "SQL": "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,\"Transportation\") and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 4258, "SQL": "select transaction_id from master_txn_table where customers = \"Kenneth Esparza\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 4259, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Richard Harvey\" ) " }, { "id": 4260, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kenneth Hernandez\" ) " }, { "id": 4261, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Robert Solis\" ) " }, { "id": 4262, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Miss Teresa Sanders\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 4263, "SQL": "select transaction_date from master_txn_table where customers = \"Denise Collins\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 4264, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"David Murphy\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 4265, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Jennifer Henderson\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) )" }, { "id": 4266, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 4267, "SQL": "select transaction_id from master_txn_table where customers = \"Erica Arnold\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 4268, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Amber Brown\"" }, { "id": 4269, "SQL": "select sum(credit) from master_txn_table where product_service = \"Ships\" and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 4270, "SQL": "select transaction_id from master_txn_table where customers = \"Carolyn Solomon\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 4271, "SQL": "select transaction_date 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 = \"Securities\" order by transaction_date asc limit 1 " }, { "id": 4272, "SQL": "select transaction_date 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 = \"Shunting trailers\" order by transaction_date asc limit 1 " }, { "id": 4273, "SQL": "select transaction_date from master_txn_table where customers = \"Vicki Russell\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 4274, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Matthew Flores\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 4275, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 4276, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Warren Hernandez\" ) " }, { "id": 4277, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Retailing Wardrobe\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 4278, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kelly Barnes\" ) " }, { "id": 4279, "SQL": "select max(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 = \"Heather Ross\" and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 4280, "SQL": "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,\"Bars and nightclubs\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 4281, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Victor Craig\"" }, { "id": 4282, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 4283, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Musical performances\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 4284, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"William Allen\" ) " }, { "id": 4285, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Richard Wells\" ) " }, { "id": 4286, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Commissions & fees\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 4287, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Robert Gomez\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 4288, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Utilities\") and vendor = \"David Castro\"" }, { "id": 4289, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Providing courses in computer programming\") and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 4290, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by billing_city" }, { "id": 4291, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 4292, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Melissa Cox\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 4293, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 4294, "SQL": "select transaction_date from master_txn_table where customers = \"Mark Weiss\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 4295, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Elizabeth Cruz\"" }, { "id": 4296, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 4297, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Mary Cox\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) )" }, { "id": 4298, "SQL": "select transaction_id from master_txn_table where product_service = \"Government Purposes\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 4299, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Keith Knight\" and transaction_type = 'invoice'" }, { "id": 4300, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Katherine Welch\" ) " }, { "id": 4301, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Kaylee Miles\"" }, { "id": 4302, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Amanda Oneal' or vendor = 'Amanda Oneal'" }, { "id": 4303, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 4304, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Gas and Electric\") and vendor = \"Michelle Parker\"" }, { "id": 4305, "SQL": "select transaction_date from master_txn_table where customers = \"Cassandra Kramer DVM\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 4306, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Commissions & fees\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 4307, "SQL": "select transaction_date from master_txn_table where customers = \"William Scott\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 4308, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Donald Harris\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date) AND date(current_date) )" }, { "id": 4309, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Cynthia Reynolds\" ) " }, { "id": 4310, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 4311, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 4312, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Sharon Nelson\"" }, { "id": 4313, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Phillip Rogers\" ) " }, { "id": 4314, "SQL": "select transaction_id from master_txn_table where customers = \"Ashley Pacheco MD\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 4315, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Brandon Dean\"" }, { "id": 4316, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 4317, "SQL": "select transaction_date from master_txn_table where customers = \"Judy Harvey\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 4318, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Eric White\" ) " }, { "id": 4319, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Julia Hughes\" order by transaction_date limit 1" }, { "id": 4320, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 4321, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Manufacturing other Synthetic Oils\") and 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') " }, { "id": 4322, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Tammy Tran\" ) " }, { "id": 4323, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Gary Ward\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 4324, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') group by billing_city" }, { "id": 4325, "SQL": "select transaction_id from master_txn_table where customers = \"Bryan Thornton\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 4326, "SQL": "select transaction_date from master_txn_table where customers = \"Tina Harding\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 4327, "SQL": "select transaction_date from master_txn_table where customers = \"Sara Martinez\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 4328, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Ashley Barrett MD\" order by transaction_date limit 1" }, { "id": 4329, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 4330, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Transportation services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 4331, "SQL": "select transaction_date 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 = \"Boat\" order by transaction_date asc limit 1 " }, { "id": 4332, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Paul Murphy\" and transaction_type = 'invoice'" }, { "id": 4333, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' 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') " }, { "id": 4334, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 4335, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 4336, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 4337, "SQL": "select transaction_date 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 = \"IT and telecommunication\" order by transaction_date asc limit 1 " }, { "id": 4338, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Mark Nguyen\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 4339, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 4340, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Peter Medina\" and transaction_type = 'invoice'" }, { "id": 4341, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 4342, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Thomas Mckinney\" and transaction_type = 'invoice'" }, { "id": 4343, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and 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') group by billing_city" }, { "id": 4344, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 4345, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Loretta Murphy\" ) " }, { "id": 4346, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Stationery & Printing\") and vendor = \"Richard Lee\"" }, { "id": 4347, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Adoption placement services\") and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 4348, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"April Williams\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 4349, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 4350, "SQL": "select max(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 = \"Joshua Knox\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 4351, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Nancy Morgan\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) )" }, { "id": 4352, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 4353, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Elizabeth Jones MD\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) )" }, { "id": 4354, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 4355, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 4356, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Paige Johnson\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 4357, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Providing financing related to securities\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 4358, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Joshua Howell\" ) " }, { "id": 4359, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Kathryn Ramirez\"" }, { "id": 4360, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Stacy Hawkins\" ) " }, { "id": 4361, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Gas and Electric\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 4362, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Russell Stewart\" ) " }, { "id": 4363, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 4364, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by billing_city" }, { "id": 4365, "SQL": "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,\"Drain cleaning\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 4366, "SQL": "select transaction_date from master_txn_table where customers = \"James Weber\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 4367, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Thomas Walker\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 4368, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Supplies\") and vendor = \"John Gonzalez\"" }, { "id": 4369, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 4370, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Gregory Mueller\" order by transaction_date limit 1" }, { "id": 4371, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 4372, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Anne Daniel\" and transaction_type = 'invoice'" }, { "id": 4373, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Valerie Valenzuela\" order by transaction_date limit 1" }, { "id": 4374, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Anthony Joyce\" and transaction_type = 'invoice'" }, { "id": 4375, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Grant Sullivan\" ) " }, { "id": 4376, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 4377, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Boat\" " }, { "id": 4378, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Patricia Evans\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 4379, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 4380, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jeffery Bowen\" ) " }, { "id": 4381, "SQL": "select transaction_id from master_txn_table where customers = \"Anna Proctor\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 4382, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Allison Stephens\" ) " }, { "id": 4383, "SQL": "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,\"Development of software products for Tablets\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 4384, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 4385, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Jenna Powell\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') ) " }, { "id": 4386, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Other nonnuclear power generation\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 4387, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 4388, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Teresa Grant' or vendor = 'Teresa Grant'" }, { "id": 4389, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Richard Rocha\" ) " }, { "id": 4390, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Natalie Peck\" and transaction_type = 'invoice'" }, { "id": 4391, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Hydrogen\" " }, { "id": 4392, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Raymond Phillips\" and account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 4393, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jeremy Reyes\" order by transaction_date limit 1" }, { "id": 4394, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 4395, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Anne Hernandez\"" }, { "id": 4396, "SQL": "select transaction_id from master_txn_table where customers = \"Katherine Mills\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 4397, "SQL": "select transaction_id from master_txn_table where product_service = \"Home office\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 4398, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 4399, "SQL": "select transaction_id from master_txn_table where customers = \"Bridget Downs\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 4400, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 4401, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 4402, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jasmine Martinez\" and transaction_type = 'invoice'" }, { "id": 4403, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Offering macro funds\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 4404, "SQL": "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 homemaker and companion services\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 4405, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Heather Rodriguez\" ) " }, { "id": 4406, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Christopher Raymond\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 4407, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 4408, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Non-nuclear\" " }, { "id": 4409, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jennifer Carey\" order by transaction_date limit 1" }, { "id": 4410, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 4411, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 4412, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Retailing Chairs\") and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 4413, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Carla Lopez\" order by transaction_date limit 1" }, { "id": 4414, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Gary Hudson\" ) " }, { "id": 4415, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 4416, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jessica Little\" ) " }, { "id": 4417, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 4418, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Surveying wells\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 4419, "SQL": "select max(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 = \"Paul Morrison\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 4420, "SQL": "select transaction_date from master_txn_table where customers = \"Alexis Watson\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 4421, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 4422, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Bookkeeper\") and vendor = \"Rebecca Garza MD\"" }, { "id": 4423, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Meredith Griffin\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 4424, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Eric Cooke\" ) " }, { "id": 4425, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 4426, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Robert Harris\" ) " }, { "id": 4427, "SQL": "select transaction_id from master_txn_table where customers = \"Joann Padilla\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 4428, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kimberly Frey\" ) " }, { "id": 4429, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Karen Russell\" ) " }, { "id": 4430, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 4431, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Katelyn Morris\" ) " }, { "id": 4432, "SQL": "select sum(credit) from master_txn_table where product_service = \"Home care\" and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 4433, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"John Le\" order by transaction_date limit 1" }, { "id": 4434, "SQL": "select transaction_date from master_txn_table where customers = \"Matthew Oneill\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 4435, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Latasha Williams\" ) " }, { "id": 4436, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Symphony performances\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 4437, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Lauren Owens\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 4438, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Nitrogen manufacturing\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 4439, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Lindsey Beltran\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) ) " }, { "id": 4440, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Tonya Hicks\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 4441, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Andrea Vargas\" and account_type in ('Expense','Other Expense') and 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') " }, { "id": 4442, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Denise Lopez\" ) " }, { "id": 4443, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Taylor Reyes\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) )" }, { "id": 4444, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 4445, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Michael Mercado\" ) " }, { "id": 4446, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jose Mcbride\" and transaction_type = 'invoice'" }, { "id": 4447, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Janice Matthews\" order by transaction_date limit 1" }, { "id": 4448, "SQL": "select transaction_date from master_txn_table where customers = \"Luke Rodriguez\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 4449, "SQL": "select sum(credit) from master_txn_table where product_service = \"Care-planning\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 4450, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Philip Washington\" ) " }, { "id": 4451, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 4452, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Carl Murphy' or vendor = 'Carl Murphy'" }, { "id": 4453, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Gas and Electric\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 4454, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 4455, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Gas and Electric\") 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') " }, { "id": 4456, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 4457, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Quality management accreditation\") and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 4458, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 4459, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Patrick Jones\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 4460, "SQL": "select transaction_id from master_txn_table where customers = \"Jessica Todd\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 4461, "SQL": "select product_service, 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 transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') group by product_service order by sum(credit) desc limit 1" }, { "id": 4462, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Metal ore exploration\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 4463, "SQL": "select transaction_date 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 = \"Food & drink\" order by transaction_date asc limit 1 " }, { "id": 4464, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ronald Scott\" ) " }, { "id": 4465, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') and account_type in ('Expense','Other Expense') " }, { "id": 4466, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Janice Harris\"" }, { "id": 4467, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Melissa Wall\"" }, { "id": 4468, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Daniel Mooney\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 4469, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Tiffany Vasquez\"" }, { "id": 4470, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Megan Bowers\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') ) " }, { "id": 4471, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Pool maintenance\") and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 4472, "SQL": "select transaction_date 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 = \"Toys\" order by transaction_date asc limit 1 " }, { "id": 4473, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kristen Riddle\" ) " }, { "id": 4474, "SQL": "select transaction_date from master_txn_table where customers = \"Steven Stein\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 4475, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Steven Pope\" ) " }, { "id": 4476, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") order by sum(debit) desc limit 1" }, { "id": 4477, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Sharon Gallegos\"" }, { "id": 4478, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ryan King\" ) " }, { "id": 4479, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Stephen Willis\"" }, { "id": 4480, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Elizabeth Rodriguez\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 4481, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Wholesaling navigational instruments (except electronic)\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 4482, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Crystal Morrison\" ) " }, { "id": 4483, "SQL": "select transaction_date from master_txn_table where customers = \"Emily Schaefer\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 4484, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jamie Fernandez\"" }, { "id": 4485, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 4486, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 4487, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"golf courses and country clubs\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 4488, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 4489, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Danielle Johnson\" ) " }, { "id": 4490, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 4491, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Fuel\") and vendor = \"Christopher Alexander\"" }, { "id": 4492, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 4493, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 4494, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Well casings\" " }, { "id": 4495, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Thomas Le\" ) " }, { "id": 4496, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Adoption placement services\") and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 4497, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Andrew Hansen\" ) " }, { "id": 4498, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 4499, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 4500, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 4501, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Services\") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 4502, "SQL": "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,\"Purchases\") and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 4503, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Ashley Washington\"" }, { "id": 4504, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Douglas Barker\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 4505, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' 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') " }, { "id": 4506, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 4507, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Retailing bedding\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 4508, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Nicole Herrera' or vendor = 'Nicole Herrera'" }, { "id": 4509, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Stephanie Curry\" ) " }, { "id": 4510, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Diane Long\" ) " }, { "id": 4511, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"John Chen\" ) " }, { "id": 4512, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'William Jones' or vendor = 'William Jones'" }, { "id": 4513, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 4514, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Paul Summers\" ) " }, { "id": 4515, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Fluorocarbon gases manufacturing\") and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 4516, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Elizabeth Todd\"" }, { "id": 4517, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Providing grain leveling and trimming in railroad cars\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 4518, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Ryan Scott\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 4519, "SQL": "select sum(credit) from master_txn_table where product_service = \"Synthetic Oils\" and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 4520, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Scott Farmer\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 4521, "SQL": "select transaction_date from master_txn_table where customers = \"Tamara Fields\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 4522, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 4523, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Non-musical performances\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 4524, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Joseph Collins\" ) " }, { "id": 4525, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Shannon Ellis\" ) " }, { "id": 4526, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Lorraine Valdez\" and transaction_type = 'invoice'" }, { "id": 4527, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 4528, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Karen Schultz DDS\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') )" }, { "id": 4529, "SQL": "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,\"Shearing services\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 4530, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Laura Hunt\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) ) " }, { "id": 4531, "SQL": "select transaction_date from master_txn_table where customers = \"Nancy Bass\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 4532, "SQL": "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 sporting goods retailing\") and 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') " }, { "id": 4533, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Offering equity long/short \") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 4534, "SQL": "select transaction_id from master_txn_table where customers = \"Richard Bryant\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 4535, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') order by sum(debit) desc limit 1" }, { "id": 4536, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Samantha Hatfield\" and account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 4537, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') and account_type in ('Expense','Other Expense') " }, { "id": 4538, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date) AND date(current_date) group by billing_city" }, { "id": 4539, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Kenneth Martinez\" order by transaction_date limit 1" }, { "id": 4540, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Mark Banks\"" }, { "id": 4541, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Don Coleman\"" }, { "id": 4542, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 4543, "SQL": "select transaction_id from master_txn_table where customers = \"Alexis Miller\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 4544, "SQL": "select transaction_date 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 = \"Symphony\" order by transaction_date asc limit 1 " }, { "id": 4545, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 4546, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Carlos Day\" ) " }, { "id": 4547, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Rachel Perez\" ) " }, { "id": 4548, "SQL": "select max(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 = \"Rhonda Cooper\" and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 4549, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 4550, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by billing_city" }, { "id": 4551, "SQL": "select transaction_id from master_txn_table where product_service = \"Gifts and grants\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 4552, "SQL": "select product_service, 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 transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') group by product_service order by sum(credit) desc limit 1" }, { "id": 4553, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) group by billing_city" }, { "id": 4554, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Julia Martinez\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 4555, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Timothy Russell\" ) " }, { "id": 4556, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Richard Moore\" ) " }, { "id": 4557, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Shunting trailers\" " }, { "id": 4558, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Patrick Edwards\" ) " }, { "id": 4559, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jay Lewis\" ) " }, { "id": 4560, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 4561, "SQL": "select transaction_id from master_txn_table where customers = \"Edward Potter\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 4562, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Nicholas Sandoval\" ) " }, { "id": 4563, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Tamara Rice\" ) " }, { "id": 4564, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Registration for tournaments and matches\") and 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') " }, { "id": 4565, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 4566, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Dues & Subscriptions\") and vendor = \"Ashlee Hoffman\"" }, { "id": 4567, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Diana Duncan\" ) " }, { "id": 4568, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Xavier Sutton II\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') ) " }, { "id": 4569, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Michael Pena\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 4570, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by billing_city" }, { "id": 4571, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Trevor Williams\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 4572, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Melvin Burns\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 4573, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kimberly Kennedy\" ) " }, { "id": 4574, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Stephanie Hayes\" order by transaction_date limit 1" }, { "id": 4575, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") order by sum(debit) desc limit 1" }, { "id": 4576, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)group by product_service order by sum(credit) desc limit 1" }, { "id": 4577, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Stuart Williams\"" }, { "id": 4578, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 4579, "SQL": "select sum(credit) from master_txn_table where product_service = \"Auto mobiles\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 4580, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Aaron Peterson' or vendor = 'Aaron Peterson'" }, { "id": 4581, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Margaret Wilkins\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) )" }, { "id": 4582, "SQL": "select transaction_id from master_txn_table where customers = \"Benjamin Hardy\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 4583, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Peter Wilcox' or vendor = 'Peter Wilcox'" }, { "id": 4584, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 4585, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Ronald Jackson\" and transaction_type = 'invoice'" }, { "id": 4586, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 4587, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') group by billing_city" }, { "id": 4588, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") order by sum(debit) desc limit 1" }, { "id": 4589, "SQL": "select max(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 = \"Brian Newton\" and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 4590, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Michele Clark\" ) " }, { "id": 4591, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Randy Baker\" ) " }, { "id": 4592, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') order by sum(debit) desc limit 1" }, { "id": 4593, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Kevin Keller\" and transaction_type = 'payment' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') ) " }, { "id": 4594, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Christine Hardy\" ) " }, { "id": 4595, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lance Jacobs\" ) " }, { "id": 4596, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 4597, "SQL": "select sum(credit) from master_txn_table where product_service = \"Nitrogen\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 4598, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Jason Ewing\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 4599, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Rachel Taylor\" order by transaction_date limit 1" }, { "id": 4600, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Robert Osborn\" ) " }, { "id": 4601, "SQL": "select transaction_date from master_txn_table where customers = \"Maria Johnson\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 4602, "SQL": "select transaction_date 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 = \"Contracts\" order by transaction_date asc limit 1 " }, { "id": 4603, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"James Liu\" and transaction_type = 'invoice'" }, { "id": 4604, "SQL": "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 = \"Jeremy Parker\" and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 4605, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Justin Cruz\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 4606, "SQL": "select max(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 = \"Eric Wang\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 4607, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kristen Riddle\" ) " }, { "id": 4608, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Meghan Fernandez\" and transaction_type = 'invoice'" }, { "id": 4609, "SQL": "select max(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 = \"Christopher Baker\" and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 4610, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kim Aguirre\" ) " }, { "id": 4611, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jane Porter\" ) " }, { "id": 4612, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Ryan Evans\" order by transaction_date limit 1" }, { "id": 4613, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Fluorocarbon gases\" " }, { "id": 4614, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Other sporting goods retailing\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 4615, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Gas and Electric\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 4616, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 4617, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Karen Jones\" and account_type in ('Expense','Other Expense') and 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') " }, { "id": 4618, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by billing_city" }, { "id": 4619, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Carriers\" " }, { "id": 4620, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 4621, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Samuel Evans\" ) " }, { "id": 4622, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Cassandra Johnson\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) )" }, { "id": 4623, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 4624, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') order by sum(debit) desc limit 1" }, { "id": 4625, "SQL": "select sum(credit) from master_txn_table where product_service = \"Nitrogen\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 4626, "SQL": "select max(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 = \"Natasha Fernandez\" and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 4627, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 4628, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' 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') " }, { "id": 4629, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kimberly Moore\" ) " }, { "id": 4630, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Samantha Mitchell\" ) " }, { "id": 4631, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Kyle Morgan\"" }, { "id": 4632, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Susan Adams\" ) " }, { "id": 4633, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 4634, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Offering fixed income funds\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 4635, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Tamara Leach\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 4636, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Max Carney\" ) " }, { "id": 4637, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Katrina Hayes\" ) " }, { "id": 4638, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jessica Nelson\" ) " }, { "id": 4639, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"David Baker\" and transaction_type = 'invoice'" }, { "id": 4640, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Elizabeth Brennan\" and transaction_type = 'invoice'" }, { "id": 4641, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') order by sum(debit) desc limit 1" }, { "id": 4642, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Bookkeeper\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 4643, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 4644, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Cristian Tate\" and transaction_type = 'payment' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') ) " }, { "id": 4645, "SQL": "select transaction_id from master_txn_table where product_service = \"Construction management\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 4646, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 4647, "SQL": "select transaction_date from master_txn_table where customers = \"Mallory Wong\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 4648, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Retailing stationary sofas/sofa-sleepers\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 4649, "SQL": "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,\"Breeding services\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 4650, "SQL": "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,\"Rental Services\") and 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') " }, { "id": 4651, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Thomas Harrison\"" }, { "id": 4652, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"George Ortega\" ) " }, { "id": 4653, "SQL": "select transaction_date 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 = \"Peppermint oil\" order by transaction_date asc limit 1 " }, { "id": 4654, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Luke Grant\" ) " }, { "id": 4655, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Synthetic Oils\" " }, { "id": 4656, "SQL": "select transaction_id from master_txn_table where product_service = \"Investment\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 4657, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sierra Santos\" ) " }, { "id": 4658, "SQL": "select transaction_date 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 = \"Food & drink\" order by transaction_date asc limit 1 " }, { "id": 4659, "SQL": "select transaction_date from master_txn_table where customers = \"Wesley Werner\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 4660, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Mia Sanchez\" ) " }, { "id": 4661, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Michelle Harris\" order by transaction_date limit 1" }, { "id": 4662, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Donna Anderson\" ) " }, { "id": 4663, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 4664, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Cost of Labor\") and vendor = \"William Dixon\"" }, { "id": 4665, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 4666, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 4667, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 4668, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Cindy Allen\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 4669, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Labor\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 4670, "SQL": "select transaction_id from master_txn_table where customers = \"Danny Wong\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 4671, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Alexandra Price\" ) " }, { "id": 4672, "SQL": "select avg(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 = \"Adam Marshall\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 4673, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Karen Howe\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 4674, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Christopher Green\" order by transaction_date limit 1" }, { "id": 4675, "SQL": "select transaction_date from master_txn_table where customers = \"Eric Howell\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 4676, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Katherine Rogers\"" }, { "id": 4677, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Daniel Glass\" ) " }, { "id": 4678, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 4679, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Ashlee Doyle\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) ) " }, { "id": 4680, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Anthony Odonnell\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 4681, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 4682, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Morgan Barrera\" ) " }, { "id": 4683, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Brian Prince\" and transaction_type = 'invoice'" }, { "id": 4684, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Rebecca Navarro\" ) " }, { "id": 4685, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Lauren Cook\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 4686, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 4687, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Amber Brock\" and transaction_type = 'payment' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') )" }, { "id": 4688, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') group by billing_city" }, { "id": 4689, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Bookkeeper\") and vendor = \"Michael Bird\"" }, { "id": 4690, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 4691, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Construction management services\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 4692, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Joseph Fisher PhD\" ) " }, { "id": 4693, "SQL": "select transaction_id from master_txn_table where customers = \"Adrian Thomas\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 4694, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Computer Repair and Maintainenance\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 4695, "SQL": "select transaction_date from master_txn_table where customers = \"Suzanne Lee\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 4696, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"James Wallace\"" }, { "id": 4697, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Dennis Sanchez\"" }, { "id": 4698, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Aaron Murray\" ) " }, { "id": 4699, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Matthew Fisher\" ) " }, { "id": 4700, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Private parcel mailing centers\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 4701, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Erin Wolf\" ) " }, { "id": 4702, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Sabrina Rivera\"" }, { "id": 4703, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 4704, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brian Hardin\" ) " }, { "id": 4705, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 4706, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 4707, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Alexandra Allen' or vendor = 'Alexandra Allen'" }, { "id": 4708, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 4709, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Nonmetallic mineral ore exploration\") and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 4710, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Rhonda Turner\" ) " }, { "id": 4711, "SQL": "select sum(credit) from master_txn_table where product_service = \"LAN\" and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 4712, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 4713, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 4714, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Cementing walls\" " }, { "id": 4715, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 4716, "SQL": "select sum(credit) from master_txn_table where product_service = \"Self-help programs\" and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 4717, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Jennifer Walker\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 4718, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Offering equity market neutral funds\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 4719, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Brad Diaz\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') )" }, { "id": 4720, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Dues & Subscriptions\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 4721, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 4722, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Robin Martin\" ) " }, { "id": 4723, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jacqueline Robertson\" ) " }, { "id": 4724, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Paul Watson\" ) " }, { "id": 4725, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lisa Hartman\" ) " }, { "id": 4726, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Unapplied Cash Bill Payment Expense\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 4727, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sean Sharp\" ) " }, { "id": 4728, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Tammy Haney\" ) " }, { "id": 4729, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jennifer Choi\" ) " }, { "id": 4730, "SQL": "select max(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 = \"Jordan Grimes\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 4731, "SQL": "select transaction_id from master_txn_table where product_service = \"Golf Equipment\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 4732, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Anna Sanford\" ) " }, { "id": 4733, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Cody Osborn\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) )" }, { "id": 4734, "SQL": "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,\"Baby car seats\") and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 4735, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Melinda Berg\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') ) " }, { "id": 4736, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Offering equity long-only\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 4737, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Taxes & Licenses\") and vendor = \"Natalie Browning\"" }, { "id": 4738, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 4739, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Daniel Torres\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 4740, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Carolyn Casey\" and transaction_type = 'invoice'" }, { "id": 4741, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Dale Carroll\" and transaction_type = 'invoice'" }, { "id": 4742, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 4743, "SQL": "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 courses through business schools\") 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') " }, { "id": 4744, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 4745, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Home therapy services\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 4746, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Marc Williams\" ) " }, { "id": 4747, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Austin Dennis\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 4748, "SQL": "select transaction_id from master_txn_table where product_service = \"Home office\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 4749, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jessica Mcdaniel\" order by transaction_date limit 1" }, { "id": 4750, "SQL": "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,\"Baby strollers\") and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 4751, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 4752, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 4753, "SQL": "select min(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 = \"Shannon Edwards\" and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 4754, "SQL": "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,\"Running, cutting and pulling casings, tubes and rods\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 4755, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 4756, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Robert Rasmussen\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 4757, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 4758, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Yvonne Solis' or vendor = 'Yvonne Solis'" }, { "id": 4759, "SQL": "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 construction activities\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 4760, "SQL": "select sum(credit) from master_txn_table where product_service = \"Oil and gas wells\" and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 4761, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 4762, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Joseph Taylor\" and transaction_type = 'invoice'" }, { "id": 4763, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Charles Stewart\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 4764, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 4765, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sandra Atkins\" ) " }, { "id": 4766, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Nursing and health services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 4767, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Stephen Ortega\"" }, { "id": 4768, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jon Romero\" order by transaction_date limit 1" }, { "id": 4769, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Terry Lang\" ) " }, { "id": 4770, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Leslie Ware\" ) " }, { "id": 4771, "SQL": "select sum(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Bowling\" " }, { "id": 4772, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Jennifer Wolfe\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') ) " }, { "id": 4773, "SQL": "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,\"Meals and Entertainment\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 4774, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Ethan Sherman\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 4775, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Amy Holland\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 4776, "SQL": "select transaction_id from master_txn_table where customers = \"Justin Romero\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 4777, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Paul Gonzalez\" ) " }, { "id": 4778, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Lisa Moody\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 4779, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Lee Hernandez\" and transaction_type = 'payment' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') ) " }, { "id": 4780, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Stephen Fitzgerald\" and account_type in ('Expense','Other Expense') and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 4781, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 4782, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Hunter Zamora\" order by transaction_date limit 1" }, { "id": 4783, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sean King\" ) " }, { "id": 4784, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 4785, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Anna Simmons\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 4786, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Equipment Rental\") and vendor = \"Carla Sutton\"" }, { "id": 4787, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 4788, "SQL": "select transaction_date 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 = \"Opera\" order by transaction_date asc limit 1 " }, { "id": 4789, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brian Combs\" ) " }, { "id": 4790, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 4791, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Stacey Beltran\" ) " }, { "id": 4792, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 4793, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Lori Butler\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 4794, "SQL": "select transaction_date 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 = \"Railroad terminals\" order by transaction_date asc limit 1 " }, { "id": 4795, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Francisco Collins\" ) " }, { "id": 4796, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Pool maintenance\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 4797, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 4798, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sandra Ortiz\" ) " }, { "id": 4799, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 4800, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 4801, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Christina Larson\"" }, { "id": 4802, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 4803, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) group by billing_city" }, { "id": 4804, "SQL": "select sum(credit) from master_txn_table where product_service = \"Mailbox Services\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 4805, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Sandra Townsend\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 4806, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") order by sum(debit) desc limit 1" }, { "id": 4807, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Loan Payable\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 4808, "SQL": "select min(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 = \"Adam Hicks\" and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 4809, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jennifer Wolfe\" ) " }, { "id": 4810, "SQL": "select transaction_id from master_txn_table where product_service = \"Snow removal services\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 4811, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where 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') and account_type in ('Expense','Other Expense') " }, { "id": 4812, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Courtney Wilson\" ) " }, { "id": 4813, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jamie Morales\" ) " }, { "id": 4814, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Coin operated games and rides\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 4815, "SQL": "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,\"Contract mining\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 4816, "SQL": "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,\"Accounts Receivable (A/R)\") and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 4817, "SQL": "select transaction_date 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 = \"Townhouses\" order by transaction_date asc limit 1 " }, { "id": 4818, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"David Barr\" ) " }, { "id": 4819, "SQL": "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,\"Shearing services\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 4820, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 4821, "SQL": "select transaction_date 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 = \"Life cycle asset management\" order by transaction_date asc limit 1 " }, { "id": 4822, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 4823, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Nicholas Yates\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 4824, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Dylan Adams\" ) " }, { "id": 4825, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") order by sum(debit) desc limit 1" }, { "id": 4826, "SQL": "select sum(credit) from master_txn_table where product_service = \"Marine Supplies\" and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 4827, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ashley Barnes\" ) " }, { "id": 4828, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 4829, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Wendy Zhang\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 4830, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 4831, "SQL": "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,\"Bowling equipment and supply retailing\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 4832, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 4833, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 4834, "SQL": "select transaction_date from master_txn_table where customers = \"Ronald Norton\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 4835, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 4836, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Deanna Johnson\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 4837, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"John Barrett\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) ) " }, { "id": 4838, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Charles Holmes\"" }, { "id": 4839, "SQL": "select transaction_id from master_txn_table where customers = \"Daniel Kaiser\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 4840, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Denise Thompson\" ) " }, { "id": 4841, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Heather May\" ) " }, { "id": 4842, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 4843, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Geothermal-fueled power generation\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 4844, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Ryan Schneider\" and transaction_type = 'invoice'" }, { "id": 4845, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by billing_city" }, { "id": 4846, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Christopher Tran\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 4847, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 4848, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 4849, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 4850, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 4851, "SQL": "select transaction_date from master_txn_table where customers = \"James Sims\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 4852, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Kenneth Steele\"" }, { "id": 4853, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Equipment Rental\") and vendor = \"Lauren Bauer\"" }, { "id": 4854, "SQL": "select transaction_date from master_txn_table where customers = \"Stephen Carroll MD\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 4855, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Matthew Adams\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 4856, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Susan Evans\" ) " }, { "id": 4857, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Erik Turner\" ) " }, { "id": 4858, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 4859, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Juan Norris\" and account_type in ('Expense','Other Expense') 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') " }, { "id": 4860, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Darryl Jackson\" ) " }, { "id": 4861, "SQL": "select transaction_id from master_txn_table where product_service = \"Oil field Machinery\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 4862, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 4863, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Meals and Entertainment\") and vendor = \"Vanessa Young\"" }, { "id": 4864, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Pamela Moses\" ) " }, { "id": 4865, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Jamie Norris\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 4866, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Larry Johnson\" ) " }, { "id": 4867, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Marilyn Klein\" ) " }, { "id": 4868, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Matthew Castillo\"" }, { "id": 4869, "SQL": "select sum(credit) from master_txn_table where product_service = \"Oil and gas wells\" and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 4870, "SQL": "select transaction_id from master_txn_table where customers = \"Anthony Stewart\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 4871, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Bangalow\" " }, { "id": 4872, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 4873, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 4874, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Steve Thomas\" ) " }, { "id": 4875, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 4876, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brent Wiggins\" ) " }, { "id": 4877, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Shannon Waller\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") ) " }, { "id": 4878, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date) AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 4879, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Blake Lewis\" ) " }, { "id": 4880, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Mark Edwards\" ) " }, { "id": 4881, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jessica Townsend\" ) " }, { "id": 4882, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Wendy Keller\" ) " }, { "id": 4883, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Youth community center services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 4884, "SQL": "select max(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 = \"Kevin Nelson\" and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 4885, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 4886, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Tina Riley\" ) " }, { "id": 4887, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Emily Hammond\" and transaction_type = 'invoice'" }, { "id": 4888, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Cynthia King\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 4889, "SQL": "select transaction_date from master_txn_table where customers = \"Annette Brown\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 4890, "SQL": "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 = \"Amanda Ware\" and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 4891, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Amanda Goodman\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) ) " }, { "id": 4892, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 4893, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Joshua Reynolds\" ) " }, { "id": 4894, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Matthew Green\" ) " }, { "id": 4895, "SQL": "select transaction_date from master_txn_table where customers = \"Christopher Coleman\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 4896, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Hotels and motel services\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 4897, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Eric Jenkins\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) ) " }, { "id": 4898, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Catherine Orozco\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 4899, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Nicholas Baxter\" ) " }, { "id": 4900, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) group by billing_city" }, { "id": 4901, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"attached and detached units\" " }, { "id": 4902, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 4903, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Anita Lee' or vendor = 'Anita Lee'" }, { "id": 4904, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 4905, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Computer operation training\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 4906, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Shawn Gonzalez\" ) " }, { "id": 4907, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jason Malone\" order by transaction_date limit 1" }, { "id": 4908, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 4909, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Heather Richmond\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') )" }, { "id": 4910, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Robert Montoya\" ) " }, { "id": 4911, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Robert Lang\" ) " }, { "id": 4912, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ariel Parker\" ) " }, { "id": 4913, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Recreation\" " }, { "id": 4914, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Jonathan Cummings\"" }, { "id": 4915, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Taylor Thompson\"" }, { "id": 4916, "SQL": "select product_service, 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 transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') group by product_service order by sum(credit) desc limit 1" }, { "id": 4917, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 4918, "SQL": "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\") and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 4919, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Keith Ball\" ) " }, { "id": 4920, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"David Lewis\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 4921, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"John Ellis\" and transaction_type = 'invoice'" }, { "id": 4922, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Providing financial planning services\") and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 4923, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Oil field machinery and equipment rental or leasing\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 4924, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Thomas Mills\" ) " }, { "id": 4925, "SQL": "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\") and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 4926, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Jennifer Carrillo' or vendor = 'Jennifer Carrillo'" }, { "id": 4927, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Offering emerging market funds\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 4928, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Private mailbox rental centers\") and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 4929, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Discounts given\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 4930, "SQL": "select avg(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 = \"Lisa Kim\" and 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') " }, { "id": 4931, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') order by sum(debit) desc limit 1" }, { "id": 4932, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Fuel\") and vendor = \"Dennis Sanchez\"" }, { "id": 4933, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 4934, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Maria Flores\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 4935, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Musicians\" " }, { "id": 4936, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Manufacturing industrial inorganic gases\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 4937, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Social activities\" " }, { "id": 4938, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') and account_type in ('Expense','Other Expense') " }, { "id": 4939, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Benjamin Weaver\" ) " }, { "id": 4940, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Timothy Flowers\" ) " }, { "id": 4941, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 4942, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Daily living assistance\") and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 4943, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Michael Lewis\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 4944, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Shannon Rhodes\" ) " }, { "id": 4945, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by billing_city" }, { "id": 4946, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Yolanda Mueller\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 4947, "SQL": "select transaction_id from master_txn_table where customers = \"Benjamin Bennett\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 4948, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Process management\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 4949, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jerome Brown\" ) " }, { "id": 4950, "SQL": "select sum(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Environmental impact assessment\" " }, { "id": 4951, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Allison Lowe\" ) " }, { "id": 4952, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 4953, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Pamela Miller\" order by transaction_date limit 1" }, { "id": 4954, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Hotels and motel services\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 4955, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Becky Martin\"" }, { "id": 4956, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jeffrey Juarez\" ) " }, { "id": 4957, "SQL": "select transaction_date 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 = \"Waste-fueled\" order by transaction_date asc limit 1 " }, { "id": 4958, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Anthony Lambert\" order by transaction_date limit 1" }, { "id": 4959, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jason Joseph\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 4960, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Bowling equipment and supply retailing\") 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') " }, { "id": 4961, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 4962, "SQL": "select transaction_date 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 = \"Copying\" order by transaction_date asc limit 1 " }, { "id": 4963, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"General contracting\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 4964, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 4965, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' 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') " }, { "id": 4966, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"George Scott\" ) " }, { "id": 4967, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by billing_city" }, { "id": 4968, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"William Walsh\" ) " }, { "id": 4969, "SQL": "select max(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 = \"Kayla Trevino\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 4970, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Alexander Arias\" ) " }, { "id": 4971, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 4972, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Glenn Davis\" order by transaction_date limit 1" }, { "id": 4973, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jessica Benitez\" ) " }, { "id": 4974, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Robert Price\"" }, { "id": 4975, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') group by billing_city" }, { "id": 4976, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 4977, "SQL": "select sum(credit) from master_txn_table where product_service = \"Distressed Securities\" and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 4978, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Curtis Adams\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 4979, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 4980, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Care-planning\" " }, { "id": 4981, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') order by sum(debit) desc limit 1" }, { "id": 4982, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by billing_city" }, { "id": 4983, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Maintenance and Repairs\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 4984, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Margaret Frost\"" }, { "id": 4985, "SQL": "select transaction_date from master_txn_table where customers = \"Tammy Villanueva\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 4986, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 4987, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Ventilation cleaning\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 4988, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Brian Grant\" order by transaction_date limit 1" }, { "id": 4989, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Whitney Gardner\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 4990, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Alexandra Taylor\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 4991, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 4992, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"David Carlson\" order by transaction_date limit 1" }, { "id": 4993, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jeanette Contreras\" and transaction_type = 'invoice'" }, { "id": 4994, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 4995, "SQL": "select transaction_date from master_txn_table where customers = \"Michael Wolfe\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 4996, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Swimming pool Cleaning\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 4997, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Meal services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 4998, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Abigail Cooper\" and transaction_type = 'invoice'" }, { "id": 4999, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date) AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 5000, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Andrew Smith\" and account_type in ('Expense','Other Expense') and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 5001, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Spencer Clay\" ) " }, { "id": 5002, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Peter Goodman\" and transaction_type = 'payment' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') ) " }, { "id": 5003, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Tammy Marshall\" ) " }, { "id": 5004, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Kelsey Miller\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 5005, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 5006, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jamie Aguilar\"" }, { "id": 5007, "SQL": "select transaction_id from master_txn_table where product_service = \"Appearances and speeches\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 5008, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 5009, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Alexander Cervantes\" ) " }, { "id": 5010, "SQL": "select transaction_date 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 = \"Self-help programs\" order by transaction_date asc limit 1 " }, { "id": 5011, "SQL": "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,\"Campground and RV park services\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 5012, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kevin Harrison\" ) " }, { "id": 5013, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 5014, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Corey Allen\" ) " }, { "id": 5015, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 5016, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 5017, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 5018, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Constructing townhouses\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 5019, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Amber Gilbert\" order by transaction_date limit 1" }, { "id": 5020, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"James Terry\" and transaction_type = 'invoice'" }, { "id": 5021, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Eric Mckinney\" ) " }, { "id": 5022, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 5023, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Bonnie Newman\" order by transaction_date limit 1" }, { "id": 5024, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') group by billing_city" }, { "id": 5025, "SQL": "select transaction_date from master_txn_table where customers = \"Nancy Taylor\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 5026, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 5027, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Alexis Fletcher\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) ) " }, { "id": 5028, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Dawn Black\" ) " }, { "id": 5029, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Melinda West\" ) " }, { "id": 5030, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Nathan Cobb\" order by transaction_date limit 1" }, { "id": 5031, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Anna Erickson\"" }, { "id": 5032, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Christy Gonzalez\"" }, { "id": 5033, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lisa Ellis\" ) " }, { "id": 5034, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Opera performances\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 5035, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Luis Merritt\" and transaction_type = 'invoice'" }, { "id": 5036, "SQL": "select transaction_date from master_txn_table where customers = \"April Perry\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 5037, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kimberly Strickland\" ) " }, { "id": 5038, "SQL": "select max(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 = \"Robert Mccarthy\" and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 5039, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 5040, "SQL": "select transaction_date 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 = \"Youth guidance\" order by transaction_date asc limit 1 " }, { "id": 5041, "SQL": "select sum(credit) from master_txn_table where product_service = \"Carbon dioxide\" and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 5042, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 5043, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 5044, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Photocopying\" " }, { "id": 5045, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 5046, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Lauren Cook\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 5047, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Alan Orozco\" ) " }, { "id": 5048, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Christian Morgan\"" }, { "id": 5049, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 5050, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Anna Jordan\" ) " }, { "id": 5051, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Kimberly Ruiz\" order by transaction_date limit 1" }, { "id": 5052, "SQL": "select sum(credit) from master_txn_table where product_service = \"Railroad Equipment\" and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 5053, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Donald Reynolds\" ) " }, { "id": 5054, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Theresa Huang' or vendor = 'Theresa Huang'" }, { "id": 5055, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') group by billing_city" }, { "id": 5056, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brenda Rodriguez\" ) " }, { "id": 5057, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Manufacturing spearmint oil\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 5058, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Jeremiah Nguyen' or vendor = 'Jeremiah Nguyen'" }, { "id": 5059, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Robert Parks\" ) " }, { "id": 5060, "SQL": "select transaction_date from master_txn_table where customers = \"Tiffany Ellis\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 5061, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 5062, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Stephen Smith\" ) " }, { "id": 5063, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Vanessa Mcdaniel\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') )" }, { "id": 5064, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Oil and gas wells\" " }, { "id": 5065, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Angela Anderson\" ) " }, { "id": 5066, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 5067, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 5068, "SQL": "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 railroad switching services\") and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 5069, "SQL": "select transaction_date from master_txn_table where customers = \"Kimberly Petty\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 5070, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Nicole Santiago\" ) " }, { "id": 5071, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 5072, "SQL": "select transaction_date from master_txn_table where customers = \"Michael Cross\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 5073, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Retailing entertainment furniture\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 5074, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 5075, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Golf\" " }, { "id": 5076, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Legal & Professional Fees\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 5077, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) group by billing_city" }, { "id": 5078, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ryan Wilson\" ) " }, { "id": 5079, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 5080, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Acetylene manufacturing\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 5081, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Brittany Alvarado\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') )" }, { "id": 5082, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Adam Andrews\" ) " }, { "id": 5083, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 5084, "SQL": "select transaction_date from master_txn_table where customers = \"Thomas Jimenez\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 5085, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Acetylene\" " }, { "id": 5086, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"William Hall\" ) " }, { "id": 5087, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Offering equity long bias\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 5088, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Daniel Vazquez\" order by transaction_date limit 1" }, { "id": 5089, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Carl Williams\" ) " }, { "id": 5090, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 5091, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Bedroom\" " }, { "id": 5092, "SQL": "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,\"Accounts Payable (A/P)\") and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 5093, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 5094, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 5095, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Melanie Allen\" order by transaction_date limit 1" }, { "id": 5096, "SQL": "select product_service, 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 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') group by product_service order by sum(credit) desc limit 1" }, { "id": 5097, "SQL": "select transaction_id from master_txn_table where customers = \"Kellie Russell\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 5098, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Holly Mooney\" and transaction_type = 'invoice'" }, { "id": 5099, "SQL": "select transaction_date from master_txn_table where customers = \"Ebony Moyer\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 5100, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Sonia Cunningham\" order by transaction_date limit 1" }, { "id": 5101, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Rent or Lease\") and vendor = \"Curtis Adams\"" }, { "id": 5102, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jamie Wilson\" ) " }, { "id": 5103, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Katie Weber\" order by transaction_date limit 1" }, { "id": 5104, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Gary Wilkins\" ) " }, { "id": 5105, "SQL": "select min(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 = \"Tina Nelson\" and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 5106, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Randall Johnson\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 5107, "SQL": "select transaction_id from master_txn_table where product_service = \"Carriers\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 5108, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 5109, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Carolyn Green\" order by transaction_date limit 1" }, { "id": 5110, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 5111, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 5112, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Eric Parker\" ) " }, { "id": 5113, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Joel Stanton\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 5114, "SQL": "select transaction_date 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 = \"Data processing\" order by transaction_date asc limit 1 " }, { "id": 5115, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 5116, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Christopher Mcdonald\" ) " }, { "id": 5117, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Julie Jones\" ) " }, { "id": 5118, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lori Hardin\" ) " }, { "id": 5119, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sharon Greer\" ) " }, { "id": 5120, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Oscar Dawson\" and transaction_type = 'invoice'" }, { "id": 5121, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 5122, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Jacqueline Brown\"" }, { "id": 5123, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 5124, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 5125, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 5126, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Artificial Intelligence Courses\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 5127, "SQL": "select transaction_id from master_txn_table where customers = \"Jennifer Pearson\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 5128, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jeffrey Humphrey\" ) " }, { "id": 5129, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Ronnie Hall' or vendor = 'Ronnie Hall'" }, { "id": 5130, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Carlos Murphy' or vendor = 'Carlos Murphy'" }, { "id": 5131, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Decks and Patios\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 5132, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Mark Martin\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 5133, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Stephen Torres\" ) " }, { "id": 5134, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Edward Howe\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 5135, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 5136, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 5137, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Hector West\" ) " }, { "id": 5138, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jonathan Chapman II\" ) " }, { "id": 5139, "SQL": "select max(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 = \"Jay Harris\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 5140, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Manufacturing lemon oil\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 5141, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 5142, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Christopher Alvarez\" order by transaction_date limit 1" }, { "id": 5143, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 5144, "SQL": "select transaction_date 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 = \"Securities\" order by transaction_date asc limit 1 " }, { "id": 5145, "SQL": "select transaction_date 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 = \"Fast food\" order by transaction_date asc limit 1 " }, { "id": 5146, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Dakota Kelly\" order by transaction_date limit 1" }, { "id": 5147, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Postal\" " }, { "id": 5148, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Hector Khan\" and transaction_type = 'invoice'" }, { "id": 5149, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Karen Nicholson MD\" ) " }, { "id": 5150, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Michael Friedman\"" }, { "id": 5151, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Cassandra Willis\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 5152, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 5153, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jennifer Rodgers\" ) " }, { "id": 5154, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Jordan Clark MD' or vendor = 'Jordan Clark MD'" }, { "id": 5155, "SQL": "select transaction_date from master_txn_table where customers = \"Alan Bradshaw\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 5156, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Ethan Perkins\"" }, { "id": 5157, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Kelli Brown\"" }, { "id": 5158, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jeffrey Zamora\" ) " }, { "id": 5159, "SQL": "select transaction_date from master_txn_table where customers = \"Lindsay Jackson\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 5160, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Computer Repair and Maintainenance\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 5161, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kimberly Bailey\" ) " }, { "id": 5162, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Ashley Anderson\"" }, { "id": 5163, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Renewable-fueled\" " }, { "id": 5164, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 5165, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Natasha Brown\" ) " }, { "id": 5166, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Dylan Aguirre\" ) " }, { "id": 5167, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Gary Mccoy\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 5168, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Government Purposes\" " }, { "id": 5169, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Tiffany Christian\"" }, { "id": 5170, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Penny Rollins\" ) " }, { "id": 5171, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Mary Ortiz\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 5172, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Gina Gallegos\" ) " }, { "id": 5173, "SQL": "select transaction_id from master_txn_table where product_service = \"Railroad Equipment\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 5174, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Cassandra Mccoy\" order by transaction_date limit 1" }, { "id": 5175, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Jonathan Ortiz\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) )" }, { "id": 5176, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Shannon Anderson\" ) " }, { "id": 5177, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 5178, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 5179, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Lynn Bryant' or vendor = 'Lynn Bryant'" }, { "id": 5180, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 5181, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Melanie Sanders\" order by transaction_date limit 1" }, { "id": 5182, "SQL": "select transaction_date from master_txn_table where customers = \"Jessica Mcmahon\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 5183, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Nancy Richardson\" ) " }, { "id": 5184, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 5185, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jeffery Caldwell\" ) " }, { "id": 5186, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 5187, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"golf courses and country clubs\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 5188, "SQL": "select sum(credit) from master_txn_table where product_service = \"Livestock\" and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 5189, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") order by sum(debit) desc limit 1" }, { "id": 5190, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Natalie Browning\" and account_type in ('Expense','Other Expense') 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') " }, { "id": 5191, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 5192, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 5193, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Elizabeth Golden\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 5194, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Mining machinery\" " }, { "id": 5195, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 5196, "SQL": "select transaction_date from master_txn_table where customers = \"Linda Kennedy\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 5197, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Alexis Haley\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 5198, "SQL": "select min(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 = \"Ashley Smith MD\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 5199, "SQL": "select transaction_date from master_txn_table where customers = \"Timothy Guerrero\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 5200, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Frank Walters DVM\" order by transaction_date limit 1" }, { "id": 5201, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 5202, "SQL": "select transaction_date from master_txn_table where customers = \"Miranda Henderson\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 5203, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 5204, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Meagan Garrett\" and transaction_type = 'invoice'" }, { "id": 5205, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 5206, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"William Green\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 5207, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 5208, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 5209, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Eric Patel\" ) " }, { "id": 5210, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Jordan Medina' or vendor = 'Jordan Medina'" }, { "id": 5211, "SQL": "select transaction_date from master_txn_table where customers = \"Kenneth Stephens\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 5212, "SQL": "select transaction_date 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 = \"Catering\" order by transaction_date asc limit 1 " }, { "id": 5213, "SQL": "select transaction_date 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 = \"Well casings\" order by transaction_date asc limit 1 " }, { "id": 5214, "SQL": "select transaction_date 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 = \"Shearing\" order by transaction_date asc limit 1 " }, { "id": 5215, "SQL": "select transaction_date from master_txn_table where customers = \"Charles Mills\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 5216, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Lee Martin\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') )" }, { "id": 5217, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kim Webb\" ) " }, { "id": 5218, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 5219, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Leslie Johnson\" ) " }, { "id": 5220, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Home therapy services\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 5221, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Alexander Jackson\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) ) " }, { "id": 5222, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brian Fowler\" ) " }, { "id": 5223, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 5224, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ryan Strickland\" ) " }, { "id": 5225, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 5226, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 5227, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' 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') " }, { "id": 5228, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Krista Brewer\" ) " }, { "id": 5229, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Amanda Edwards\"" }, { "id": 5230, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 5231, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') order by sum(debit) desc limit 1" }, { "id": 5232, "SQL": "select transaction_date 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 = \"Fixed income\" order by transaction_date asc limit 1 " }, { "id": 5233, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 5234, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brian Wu\" ) " }, { "id": 5235, "SQL": "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,\"Running, cutting and pulling casings, tubes and rods\") and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 5236, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Michael Mendoza\" ) " }, { "id": 5237, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 5238, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Tamara Jones\" ) " }, { "id": 5239, "SQL": "select transaction_date 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 = \"Photography\" order by transaction_date asc limit 1 " }, { "id": 5240, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"License fees\") and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 5241, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Michael Patterson\"" }, { "id": 5242, "SQL": "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 courses in computer programming\") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 5243, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Organic Gases\" " }, { "id": 5244, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jasmin Rush MD\" ) " }, { "id": 5245, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brandon Blair\" ) " }, { "id": 5246, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') order by sum(debit) desc limit 1" }, { "id": 5247, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Barbara Mayer\" ) " }, { "id": 5248, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Tami Martin\" ) " }, { "id": 5249, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brandon Ashley\" ) " }, { "id": 5250, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Rebecca Meyer\" ) " }, { "id": 5251, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Offering equity long bias\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 5252, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Latasha Lewis\" ) " }, { "id": 5253, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Timothy Landry' or vendor = 'Timothy Landry'" }, { "id": 5254, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Retailing master bedroom furniture\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 5255, "SQL": "select transaction_id from master_txn_table where product_service = \"Government Purposes\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 5256, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Michelle Lozano\"" }, { "id": 5257, "SQL": "select max(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 = \"James Baker\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 5258, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Crystal Fernandez\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) ) " }, { "id": 5259, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 5260, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 5261, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 5262, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') 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') order by sum(debit) desc limit 1" }, { "id": 5263, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Howard Bell\" ) " }, { "id": 5264, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Local area network management training\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 5265, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 5266, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 5267, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brianna Fisher\" ) " }, { "id": 5268, "SQL": "select sum(credit) from master_txn_table where product_service = \"Aeronautical Equipment\" and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 5269, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') and account_type in ('Expense','Other Expense') " }, { "id": 5270, "SQL": "select sum(credit) from master_txn_table where product_service = \"Mailbox Services\" and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 5271, "SQL": "select min(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 = \"Mark Williams\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 5272, "SQL": "select transaction_date from master_txn_table where customers = \"Daniel Simpson\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 5273, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' 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') " }, { "id": 5274, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 5275, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Heather Hernandez\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 5276, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Unapplied Cash Bill Payment Expense\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 5277, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Jonathan Hamilton' or vendor = 'Jonathan Hamilton'" }, { "id": 5278, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") and account_type in ('Expense','Other Expense') " }, { "id": 5279, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Michael Miller\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 5280, "SQL": "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 locomotives\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 5281, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 5282, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Children and youth recreational programs\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 5283, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') 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') order by sum(debit) desc limit 1" }, { "id": 5284, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 5285, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 5286, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Recognition software for healthcare\") and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 5287, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jamie Harris\" ) " }, { "id": 5288, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where 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') and account_type in ('Expense','Other Expense') " }, { "id": 5289, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jeffery Meyers\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 5290, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") and account_type in ('Expense','Other Expense') " }, { "id": 5291, "SQL": "select transaction_id from master_txn_table where product_service = \"Computer Programming\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 5292, "SQL": "select transaction_id from master_txn_table where product_service = \"Orange oil\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 5293, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 5294, "SQL": "select transaction_date from master_txn_table where customers = \"John Gregory\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 5295, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Anthony Murphy\" ) " }, { "id": 5296, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 5297, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Tim Johnson\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 5298, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Shannon Garcia\" ) " }, { "id": 5299, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Johnny Anderson\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 5300, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Chelsea Moore\" order by transaction_date limit 1" }, { "id": 5301, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 5302, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 5303, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 5304, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Melissa Cox\"" }, { "id": 5305, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brian Morales\" ) " }, { "id": 5306, "SQL": "select transaction_date 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 = \"Mailbox Services\" order by transaction_date asc limit 1 " }, { "id": 5307, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Maria Flores\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 5308, "SQL": "select transaction_date from master_txn_table where customers = \"Thomas Bush\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 5309, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Shipping\" " }, { "id": 5310, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 5311, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Antonio Fox\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) ) " }, { "id": 5312, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Justin Rodriguez\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 5313, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Raymond Cook\" ) " }, { "id": 5314, "SQL": "select max(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 = \"Hailey Marquez\" and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 5315, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 5316, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 5317, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Rental\" " }, { "id": 5318, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Alan Johnson\" ) " }, { "id": 5319, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 5320, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Frances Hughes\" ) " }, { "id": 5321, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lucas Campos\" ) " }, { "id": 5322, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Providing homemaker and companion services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 5323, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 5324, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Debra Bartlett\" ) " }, { "id": 5325, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"James Conner\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') ) " }, { "id": 5326, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Deborah Rojas\"" }, { "id": 5327, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') and account_type in ('Expense','Other Expense') " }, { "id": 5328, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Patricia Hernandez\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 5329, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Patricia Allen\" ) " }, { "id": 5330, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 5331, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Packing services for goods\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 5332, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Alan Cardenas\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 5333, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 5334, "SQL": "select transaction_date 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 = \"Golf\" order by transaction_date asc limit 1 " }, { "id": 5335, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Blake Bruce\" ) " }, { "id": 5336, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 5337, "SQL": "select transaction_id from master_txn_table where customers = \"David Galloway\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 5338, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jack Murray\" order by transaction_date limit 1" }, { "id": 5339, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Christopher Alexander\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 5340, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Matthew Grant\" ) " }, { "id": 5341, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'April Morrison' or vendor = 'April Morrison'" }, { "id": 5342, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Joshua Strickland' or vendor = 'Joshua Strickland'" }, { "id": 5343, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 5344, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Reginald Carter\" order by transaction_date limit 1" }, { "id": 5345, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Stationery & Printing\") and vendor = \"Michael Lewis\"" }, { "id": 5346, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 5347, "SQL": "select transaction_date from master_txn_table where customers = \"Michelle Mcintosh\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 5348, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) group by billing_city" }, { "id": 5349, "SQL": "select transaction_date 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 = \"Hydroelectric electricity\" order by transaction_date asc limit 1 " }, { "id": 5350, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 5351, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Greg Williams\" and transaction_type = 'invoice'" }, { "id": 5352, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounting\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 5353, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Patricia Gilbert' or vendor = 'Patricia Gilbert'" }, { "id": 5354, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Brett Hunt\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) ) " }, { "id": 5355, "SQL": "select transaction_id from master_txn_table where customers = \"Ashley Armstrong\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 5356, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Carla Morgan\" ) " }, { "id": 5357, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Brian Brown\"" }, { "id": 5358, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 5359, "SQL": "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,\"Industrial manufacturing\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 5360, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Offering multi-strategy funds\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 5361, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Patrick Chapman\" ) " }, { "id": 5362, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Vincent Ingram\" ) " }, { "id": 5363, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"William Brown\"" }, { "id": 5364, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Cynthia Joseph\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) ) " }, { "id": 5365, "SQL": "select max(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 = \"Shawn Lara\" and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 5366, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Micheal Hernandez\" ) " }, { "id": 5367, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 5368, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 5369, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 5370, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lee Lawrence\" ) " }, { "id": 5371, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Cameron Erickson\"" }, { "id": 5372, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 5373, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Derrick Smith\" ) " }, { "id": 5374, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 5375, "SQL": "select transaction_date 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 = \"Tablets\" order by transaction_date asc limit 1 " }, { "id": 5376, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Rick Meyer' or vendor = 'Rick Meyer'" }, { "id": 5377, "SQL": "select transaction_id from master_txn_table where customers = \"Nina Mendoza\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 5378, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"David Patton\" ) " }, { "id": 5379, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Becky Harrington\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') )" }, { "id": 5380, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Fees Billed\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 5381, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Kristi Ellis\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 5382, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Stationery & Printing\") and vendor = \"Jeremy Smith\"" }, { "id": 5383, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Repairing locomotives and railcars (except factory conversion, overhaul and rebuilding)\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 5384, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Amy White\" ) " }, { "id": 5385, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Kimberly Cruz\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') ) " }, { "id": 5386, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 5387, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Heather Goodman\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 5388, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jack May\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 5389, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Ceremony & reception venue\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 5390, "SQL": "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\") and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 5391, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 5392, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Patrick Washington\" order by transaction_date limit 1" }, { "id": 5393, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Rita Garcia\" ) " }, { "id": 5394, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Duct and gutter cleaning\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 5395, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Gregory Smith\" ) " }, { "id": 5396, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Andrea Burnett\" ) " }, { "id": 5397, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Troy Moody' or vendor = 'Troy Moody'" }, { "id": 5398, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jeff Cooper\" order by transaction_date limit 1" }, { "id": 5399, "SQL": "select sum(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Boat\" " }, { "id": 5400, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 5401, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 5402, "SQL": "select transaction_id from master_txn_table where customers = \"Jessica Roth\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 5403, "SQL": "select sum(credit) from master_txn_table where product_service = \"Grapefruit oil\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 5404, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jack Clay\" ) " }, { "id": 5405, "SQL": "select min(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 = \"Angelica Sandoval\" and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 5406, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 5407, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Victoria Smith\"" }, { "id": 5408, "SQL": "select transaction_date from master_txn_table where customers = \"Samuel Berry\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 5409, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Rebecca King\" ) " }, { "id": 5410, "SQL": "select product_service, 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 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') group by product_service order by sum(credit) desc limit 1" }, { "id": 5411, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Alexander Castro\" ) " }, { "id": 5412, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 5413, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Harold Franklin\" and transaction_type = 'invoice'" }, { "id": 5414, "SQL": "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,\"Athletic uniforms retailing\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 5415, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jessica Cox\"" }, { "id": 5416, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 5417, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Kimberly Beasley\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 5418, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Nathan Mccarthy\"" }, { "id": 5419, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Mark Gregory\" order by transaction_date limit 1" }, { "id": 5420, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Brian Payne\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 5421, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Providing support for money management\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 5422, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Annette Collins\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 5423, "SQL": "select min(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 = \"Jacqueline Spencer\" and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 5424, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Claire Faulkner\"" }, { "id": 5425, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Leonard Smith\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 5426, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 5427, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 5428, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 5429, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 5430, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 5431, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 5432, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Joseph Reid\" ) " }, { "id": 5433, "SQL": "select max(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 = \"Brian Bailey\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 5434, "SQL": "select sum(credit) from master_txn_table where product_service = \"Equity long bias\" and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 5435, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Robert Morales\" ) " }, { "id": 5436, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Equipment Rental\") and vendor = \"Bethany Sheppard\"" }, { "id": 5437, "SQL": "select min(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 = \"Rachel Flores\" and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 5438, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kelly Richardson\" ) " }, { "id": 5439, "SQL": "select transaction_id from master_txn_table where product_service = \"Construction Projects\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 5440, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kelli Charles\" ) " }, { "id": 5441, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Amy Anderson\" and transaction_type = 'invoice'" }, { "id": 5442, "SQL": "select transaction_date from master_txn_table where customers = \"Natalie Harper\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 5443, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Scott Rose\" ) " }, { "id": 5444, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 5445, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Wholesaling railroad cars\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 5446, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Albert Leonard\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 5447, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kendra Mendoza\" ) " }, { "id": 5448, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Stephanie Nguyen\" ) " }, { "id": 5449, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Paula Chan\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 5450, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Scott Walton\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') )" }, { "id": 5451, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jenna Ramirez\" order by transaction_date limit 1" }, { "id": 5452, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 5453, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Richard Ramsey\" ) " }, { "id": 5454, "SQL": "select sum(credit) from master_txn_table where product_service = \"Nitrogen\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 5455, "SQL": "select transaction_date from master_txn_table where customers = \"Melinda Mason\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 5456, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 5457, "SQL": "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,\"Feasibility studies\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 5458, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Erin Burton\" ) " }, { "id": 5459, "SQL": "select transaction_date 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 = \"Helium\" order by transaction_date asc limit 1 " }, { "id": 5460, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Bobby Ramirez\" ) " }, { "id": 5461, "SQL": "select min(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 = \"Jesse Martin\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 5462, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Julie Lam\" ) " }, { "id": 5463, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 5464, "SQL": "select transaction_date 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 = \"Acetylene\" order by transaction_date asc limit 1 " }, { "id": 5465, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 5466, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Monique Morales\" and transaction_type = 'payment' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') ) " }, { "id": 5467, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kimberly Proctor\" ) " }, { "id": 5468, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 5469, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Repairing locomotives and railcars (except factory conversion, overhaul and rebuilding)\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 5470, "SQL": "select transaction_id from master_txn_table where product_service = \"Railroad switching\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 5471, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Matthew Williams\"" }, { "id": 5472, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jeanette Barber\" ) " }, { "id": 5473, "SQL": "select transaction_id from master_txn_table where product_service = \"Adoption\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 5474, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Kimberly Johnson\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) )" }, { "id": 5475, "SQL": "select transaction_id from master_txn_table where customers = \"Sandra Pearson\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 5476, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Christian Knight III\" order by transaction_date limit 1" }, { "id": 5477, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Janet Harris\" ) " }, { "id": 5478, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 5479, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by billing_city" }, { "id": 5480, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jacqueline Gonzales\" and transaction_type = 'invoice'" }, { "id": 5481, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Vanessa West\"" }, { "id": 5482, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 5483, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 5484, "SQL": "select avg(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 = \"Morgan Myers\" and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 5485, "SQL": "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,\"Baby furniture\") 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') " }, { "id": 5486, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 5487, "SQL": "select transaction_date 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 = \"Townhouses\" order by transaction_date asc limit 1 " }, { "id": 5488, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 5489, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 5490, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Haley Hubbard\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) )" }, { "id": 5491, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 5492, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 5493, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Carriers\" " }, { "id": 5494, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Gabriel Gibson\"" }, { "id": 5495, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 5496, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Christina Sanders\" ) " }, { "id": 5497, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Miranda Flores\" ) " }, { "id": 5498, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') group by billing_city" }, { "id": 5499, "SQL": "select transaction_date from master_txn_table where customers = \"Jeffrey Hebert\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 5500, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 5501, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Eric Cannon\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') )" }, { "id": 5502, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name 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 account_type in ('Expense','Other Expense') " }, { "id": 5503, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Kenneth Larsen\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 5504, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 5505, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Amy Kelley\" ) " }, { "id": 5506, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Alec Carroll\"" }, { "id": 5507, "SQL": "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,\"Web hosting\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 5508, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 5509, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') order by sum(debit) desc limit 1" }, { "id": 5510, "SQL": "select sum(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Biomass electricity\" " }, { "id": 5511, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 5512, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Tiffany Bauer\"" }, { "id": 5513, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Transportation\" " }, { "id": 5514, "SQL": "select min(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 = \"Jamie Fields\" and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 5515, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 5516, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 5517, "SQL": "select transaction_id from master_txn_table where product_service = \"Lemon oil\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 5518, "SQL": "select transaction_id from master_txn_table where product_service = \"Database management\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 5519, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Danielle Rodriguez\" ) " }, { "id": 5520, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sue Lane\" ) " }, { "id": 5521, "SQL": "select transaction_date 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 = \"Medical services\" order by transaction_date asc limit 1 " }, { "id": 5522, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Raymond Levy\" order by transaction_date limit 1" }, { "id": 5523, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Omar Williams\"" }, { "id": 5524, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Kenneth Wilson' or vendor = 'Kenneth Wilson'" }, { "id": 5525, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 5526, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 5527, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 5528, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Tim Johnson\"" }, { "id": 5529, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Melissa Mccann\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 5530, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Cheryl Flores MD\"" }, { "id": 5531, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 5532, "SQL": "select transaction_id from master_txn_table where customers = \"Matthew Ferguson\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 5533, "SQL": "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,\"Ventilation cleaning\") and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 5534, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Natalie Yang\" ) " }, { "id": 5535, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Helen Pennington\" ) " }, { "id": 5536, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Jessica Wagner\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 5537, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 5538, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"David Whitney\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 5539, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Matthew Snyder' or vendor = 'Matthew Snyder'" }, { "id": 5540, "SQL": "select transaction_id from master_txn_table where customers = \"Colleen Moore\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 5541, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Amy Moon\" and transaction_type = 'invoice'" }, { "id": 5542, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Karen Fernandez\" order by transaction_date limit 1" }, { "id": 5543, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 5544, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Amy Romero\" ) " }, { "id": 5545, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Melissa Cox\" and transaction_type = 'invoice'" }, { "id": 5546, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 5547, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jennifer Lang\" ) " }, { "id": 5548, "SQL": "select sum(credit) from master_txn_table where product_service = \"Bars and Nightclubs\" and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 5549, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Raymond Campbell\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 5550, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jaime Garcia\" ) " }, { "id": 5551, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Wholesaling ships\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 5552, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Lindsay Flores\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 5553, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 5554, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 5555, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"James Norris\" ) " }, { "id": 5556, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 5557, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 5558, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') group by billing_city" }, { "id": 5559, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' 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') " }, { "id": 5560, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Providing classes in stenography and court reporting\") and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 5561, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by billing_city" }, { "id": 5562, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Christopher Baker\" and transaction_type = 'invoice'" }, { "id": 5563, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 5564, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 5565, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Private parcel mailing centers\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 5566, "SQL": "select transaction_date from master_txn_table where customers = \"Charles Pham\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 5567, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Eric Quinn' or vendor = 'Eric Quinn'" }, { "id": 5568, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Robert Norton\" and transaction_type = 'invoice'" }, { "id": 5569, "SQL": "select transaction_date from master_txn_table where customers = \"Charles Blair\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 5570, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by billing_city" }, { "id": 5571, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Monica Adams\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') )" }, { "id": 5572, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Jennifer Gordon\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 5573, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 5574, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Harold Campbell\"" }, { "id": 5575, "SQL": "select product_service, 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 transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') group by product_service order by sum(credit) desc limit 1" }, { "id": 5576, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jacob Gill\" ) " }, { "id": 5577, "SQL": "select transaction_date from master_txn_table where customers = \"Steven Carter\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 5578, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kathleen Sims\" ) " }, { "id": 5579, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Cost of Labor\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 5580, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 5581, "SQL": "select transaction_date 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 = \"Cleaning\" order by transaction_date asc limit 1 " }, { "id": 5582, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 5583, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lisa Adkins\" ) " }, { "id": 5584, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 5585, "SQL": "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,\"Social Service\") and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 5586, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"William Cabrera\" order by transaction_date limit 1" }, { "id": 5587, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 5588, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Melissa Monroe\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') )" }, { "id": 5589, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Julie Diaz\" ) " }, { "id": 5590, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Barbara Roth\" ) " }, { "id": 5591, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Christopher Torres\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') ) " }, { "id": 5592, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jason Malone\" ) " }, { "id": 5593, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Joseph Young' or vendor = 'Joseph Young'" }, { "id": 5594, "SQL": "select max(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 = \"Donna Bennett\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 5595, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Ventilation cleaning\" " }, { "id": 5596, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"George Mullins\" order by transaction_date limit 1" }, { "id": 5597, "SQL": "select transaction_id from master_txn_table where product_service = \"Self-help programs\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 5598, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Christopher Peck\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 5599, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 5600, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kurt Francis\" ) " }, { "id": 5601, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jacob Velazquez\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 5602, "SQL": "select transaction_date from master_txn_table where customers = \"Robert Kaiser\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 5603, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 5604, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 5605, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"David Lewis\" order by transaction_date limit 1" }, { "id": 5606, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name 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 account_type in ('Expense','Other Expense') " }, { "id": 5607, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Anna White\" ) " }, { "id": 5608, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Fuel\") and vendor = \"Robert Anderson\"" }, { "id": 5609, "SQL": "select max(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 = \"Jeffrey Crawford\" and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 5610, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 5611, "SQL": "select transaction_date 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 = \"Design\" order by transaction_date asc limit 1 " }, { "id": 5612, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Brian Patel\" order by transaction_date limit 1" }, { "id": 5613, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 5614, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Peter Lewis' or vendor = 'Peter Lewis'" }, { "id": 5615, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 5616, "SQL": "select product_service, 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 transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') group by product_service order by sum(credit) desc limit 1" }, { "id": 5617, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Melissa Love MD\" ) " }, { "id": 5618, "SQL": "select transaction_date from master_txn_table where customers = \"Colleen Murphy\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 5619, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jessica Barnett\" ) " }, { "id": 5620, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Vincent Armstrong\" ) " }, { "id": 5621, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Michael Mason\" ) " }, { "id": 5622, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Jasmine Watson\"" }, { "id": 5623, "SQL": "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,\"Ventilation cleaning\") and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 5624, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 5625, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Matthew Frazier\" ) " }, { "id": 5626, "SQL": "select transaction_date from master_txn_table where customers = \"Bradley Figueroa\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 5627, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Carrie George\" ) " }, { "id": 5628, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Nonmetallic mineral ore exploration\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 5629, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 5630, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Catherine Thomas\"" }, { "id": 5631, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Robert Ramirez\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') )" }, { "id": 5632, "SQL": "select sum(credit) from master_txn_table where product_service = \"Coal Pwer\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 5633, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Leah Warner\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') )" }, { "id": 5634, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 5635, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Erin Fleming\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) ) " }, { "id": 5636, "SQL": "select transaction_date from master_txn_table where customers = \"Tyler Case\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 5637, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Mackenzie Nolan\" ) " }, { "id": 5638, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Samuel Nelson\" order by transaction_date limit 1" }, { "id": 5639, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by billing_city" }, { "id": 5640, "SQL": "select transaction_date from master_txn_table where customers = \"Christine Avila\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 5641, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Katie Arnold\" ) " }, { "id": 5642, "SQL": "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,\"Saddlery retailing\") and 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') " }, { "id": 5643, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 5644, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Brenda Garcia\"" }, { "id": 5645, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Seth Conner\" order by transaction_date limit 1" }, { "id": 5646, "SQL": "select transaction_date from master_txn_table where customers = \"Linda Ross\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 5647, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Pamela Bond\"" }, { "id": 5648, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Derek Jones\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 5649, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Gary Newman\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") )" }, { "id": 5650, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Darryl Castillo\"" }, { "id": 5651, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Gerald Bradshaw\" ) " }, { "id": 5652, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Samantha Mills\" ) " }, { "id": 5653, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"William Archer\" ) " }, { "id": 5654, "SQL": "select transaction_date 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 = \"Livestock\" order by transaction_date asc limit 1 " }, { "id": 5655, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Christina Hicks\" ) " }, { "id": 5656, "SQL": "select transaction_date 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 = \"Photocopying\" order by transaction_date asc limit 1 " }, { "id": 5657, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Margaret Michael\" order by transaction_date limit 1" }, { "id": 5658, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jerry Jones\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 5659, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 5660, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 5661, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Gabrielle Gray\" ) " }, { "id": 5662, "SQL": "select transaction_id from master_txn_table where product_service = \"Equity Market Neutral\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 5663, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Craig Bennett\" ) " }, { "id": 5664, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 5665, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Evelyn Jackson\" and transaction_type = 'payment' and 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') )" }, { "id": 5666, "SQL": "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,\"food and beverage services\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 5667, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Joshua Turner\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 5668, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Erika Day\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 5669, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 5670, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Alexandra Miller\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 5671, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 5672, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Anthony Bowen\" ) " }, { "id": 5673, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Lindsay Barnett\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 5674, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Katherine Mendoza\" ) " }, { "id": 5675, "SQL": "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,\"Miscellaneous services\") and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 5676, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Sabrina Allen\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 5677, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 5678, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') and account_type in ('Expense','Other Expense') " }, { "id": 5679, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 5680, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Janet Dougherty\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') ) " }, { "id": 5681, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) group by billing_city" }, { "id": 5682, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 5683, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Valerie Valenzuela\" order by transaction_date limit 1" }, { "id": 5684, "SQL": "select sum(credit) from master_txn_table where product_service = \"Surveying wells\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 5685, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 5686, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 5687, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Thomas Floyd\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 5688, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Micheal Stephenson\"" }, { "id": 5689, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Crystal Tucker\"" }, { "id": 5690, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") and account_type in ('Expense','Other Expense') " }, { "id": 5691, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 5692, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jesse Fields\" ) " }, { "id": 5693, "SQL": "select min(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 = \"Lynn Jenkins\" and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 5694, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Allen Murphy\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 5695, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Melissa Edwards\" and transaction_type = 'invoice'" }, { "id": 5696, "SQL": "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,\"Retailing stationary sofas/sofa-sleepers\") and 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') " }, { "id": 5697, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Teresa Gonzales\" ) " }, { "id": 5698, "SQL": "select transaction_id from master_txn_table where customers = \"Luis Young\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 5699, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Kelly Booker\" and transaction_type = 'invoice'" }, { "id": 5700, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Brianna Oconnor\" and transaction_type = 'payment' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') )" }, { "id": 5701, "SQL": "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 24-hour home care\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 5702, "SQL": "select transaction_id from master_txn_table where customers = \"James Aguirre\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 5703, "SQL": "select transaction_id from master_txn_table where product_service = \"Teen outreach\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 5704, "SQL": "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,\"Oxygen manufacturing\") and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 5705, "SQL": "select transaction_date from master_txn_table where customers = \"Andres Cole\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 5706, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Stefanie Robbins\" ) " }, { "id": 5707, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"John Meadows\" ) " }, { "id": 5708, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Robert Chapman\" ) " }, { "id": 5709, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brandon Mendez\" ) " }, { "id": 5710, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Dues & Subscriptions\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 5711, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 5712, "SQL": "select transaction_date 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 = \"Railroad switching\" order by transaction_date asc limit 1 " }, { "id": 5713, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Manufacturing spearmint oil\") and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 5714, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Manufacturing industrial inorganic gases\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 5715, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 5716, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Maintenance and Repair\") and vendor = \"Anna Lewis\"" }, { "id": 5717, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Data entry\" " }, { "id": 5718, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 5719, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Pool maintenance\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 5720, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') group by billing_city" }, { "id": 5721, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 5722, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Daniel Morgan\"" }, { "id": 5723, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 5724, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 5725, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Patricia Mata\" ) " }, { "id": 5726, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Shelley Mccarthy\" ) " }, { "id": 5727, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Uncategorized Expense\") and vendor = \"Kent Willis\"" }, { "id": 5728, "SQL": "select sum(credit) from master_txn_table where product_service = \"Bicycle\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 5729, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jocelyn Anderson\" ) " }, { "id": 5730, "SQL": "select transaction_date from master_txn_table where customers = \"Juan Choi\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 5731, "SQL": "select sum(credit) from master_txn_table where product_service = \"Loading and unloading\" and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 5732, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Lisa Russo\" order by transaction_date limit 1" }, { "id": 5733, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 5734, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 5735, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"John Grimes\" and transaction_type = 'invoice'" }, { "id": 5736, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 5737, "SQL": "select sum(credit) from master_txn_table where product_service = \"Hydroelectric electricity\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 5738, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Brian Hughes\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 5739, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Data entry services\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 5740, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Amanda Jacobs\" order by transaction_date limit 1" }, { "id": 5741, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Martin Anderson\"" }, { "id": 5742, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 5743, "SQL": "select sum(credit) from master_txn_table where product_service = \"Commodity Markets\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 5744, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Mary Miller\" ) " }, { "id": 5745, "SQL": "select transaction_date from master_txn_table where customers = \"Carl Watson\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 5746, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Thomas Sharp\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 5747, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Natalie Yang\" ) " }, { "id": 5748, "SQL": "select transaction_id from master_txn_table where customers = \"Bonnie Johnson\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 5749, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 5750, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 5751, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 5752, "SQL": "select transaction_date from master_txn_table where customers = \"Julie Moore\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 5753, "SQL": "select transaction_date from master_txn_table where customers = \"Dana Nichols\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 5754, "SQL": "select min(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 = \"Kara Robbins\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 5755, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Sandra Wallace\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') )" }, { "id": 5756, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Nathan Watkins\" ) " }, { "id": 5757, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"David Willis\" ) " }, { "id": 5758, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Stacy Welch\" ) " }, { "id": 5759, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 5760, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Scott Stevenson\" order by transaction_date limit 1" }, { "id": 5761, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jennifer Logan\" order by transaction_date limit 1" }, { "id": 5762, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jacob Stone\" ) " }, { "id": 5763, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Todd Rice\" order by transaction_date limit 1" }, { "id": 5764, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Julia Davis\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 5765, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Cindy Walker\" ) " }, { "id": 5766, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Latasha Rodriguez DVM\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 5767, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Juan Norris\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 5768, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 5769, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by billing_city" }, { "id": 5770, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 5771, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 5772, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Daisy Delacruz\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 5773, "SQL": "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,\"Travel Meals\") and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 5774, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Wendy Martinez\" order by transaction_date limit 1" }, { "id": 5775, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 5776, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 5777, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Diane Brown\"" }, { "id": 5778, "SQL": "select transaction_date from master_txn_table where customers = \"Tracy Rogers\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 5779, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Justin Barnes\"" }, { "id": 5780, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"License fees\" " }, { "id": 5781, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 5782, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Amy Richardson\" ) " }, { "id": 5783, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Michael Vaughn\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 5784, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') order by sum(debit) desc limit 1" }, { "id": 5785, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Annette Kline\" ) " }, { "id": 5786, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Appearances and speeches\" " }, { "id": 5787, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Veronica Trevino\" order by transaction_date limit 1" }, { "id": 5788, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Patricia Medina\" ) " }, { "id": 5789, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Non-musical\" " }, { "id": 5790, "SQL": "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,\"Maintenance and Repairs\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 5791, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"License fees\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 5792, "SQL": "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,\"Swimming pool Cleaning\") and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 5793, "SQL": "select sum(credit) from master_txn_table where product_service = \"Spearmint oil\" and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 5794, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Dawn Howell' or vendor = 'Dawn Howell'" }, { "id": 5795, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Michelle Williams\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 5796, "SQL": "select transaction_date from master_txn_table where customers = \"Christopher Patel\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 5797, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Copy centers\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 5798, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 5799, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Social Service\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 5800, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Street vending locations\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 5801, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') group by billing_city" }, { "id": 5802, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Joseph Pearson\"" }, { "id": 5803, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Timothy Chase\" order by transaction_date limit 1" }, { "id": 5804, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 5805, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Vanessa Espinoza\" order by transaction_date limit 1" }, { "id": 5806, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 5807, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 5808, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Michael Allen\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 5809, "SQL": "select transaction_date 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 = \"Foods on demand\" order by transaction_date asc limit 1 " }, { "id": 5810, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Utilities\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 5811, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Raymond Schultz\"" }, { "id": 5812, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Samantha Williams\" order by transaction_date limit 1" }, { "id": 5813, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Craig Tyler\"" }, { "id": 5814, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lori Velasquez\" ) " }, { "id": 5815, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Danielle Black' or vendor = 'Danielle Black'" }, { "id": 5816, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 5817, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Samuel Jordan\" ) " }, { "id": 5818, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 5819, "SQL": "select sum(credit) from master_txn_table where product_service = \"Equity long-only\" and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 5820, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Dues & Subscriptions\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 5821, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Senior-care\" " }, { "id": 5822, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 5823, "SQL": "select transaction_id from master_txn_table where customers = \"Toni Boyd\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 5824, "SQL": "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,\"Offering emerging market funds\") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 5825, "SQL": "select sum(credit) from master_txn_table where product_service = \"Bicycle\" and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 5826, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 5827, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sandra Guzman\" ) " }, { "id": 5828, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 5829, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Regina Crawford\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") )" }, { "id": 5830, "SQL": "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,\"Medication dispensing\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 5831, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 5832, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Betty Tucker\" order by transaction_date limit 1" }, { "id": 5833, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 5834, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Taylor Phillips\" and transaction_type = 'invoice'" }, { "id": 5835, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Data entry services\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 5836, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 5837, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Elizabeth Lee\" order by transaction_date limit 1" }, { "id": 5838, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Rebecca Collins\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 5839, "SQL": "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,\"Party favors\") and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 5840, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' 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') " }, { "id": 5841, "SQL": "select transaction_date from master_txn_table where customers = \"Kristine Schultz\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 5842, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 5843, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Brett Crawford\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') ) " }, { "id": 5844, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Susan Proctor\" ) " }, { "id": 5845, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 5846, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Derek Garcia\" ) " }, { "id": 5847, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 5848, "SQL": "select transaction_date 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 = \"Life cycle asset management\" order by transaction_date asc limit 1 " }, { "id": 5849, "SQL": "select transaction_id from master_txn_table where product_service = \"Coal Pwer\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 5850, "SQL": "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,\"Foster care placement services\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 5851, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Services\") and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 5852, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 5853, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Supplies\") and vendor = \"Katherine Hill\"" }, { "id": 5854, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Norma Lee\" order by transaction_date limit 1" }, { "id": 5855, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Caitlin Johnson\" ) " }, { "id": 5856, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 5857, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Margaret Flores\" ) " }, { "id": 5858, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Printing\" " }, { "id": 5859, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Patrick Mejia\" ) " }, { "id": 5860, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Christopher Decker\" and account_type in ('Expense','Other Expense') and 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') " }, { "id": 5861, "SQL": "select transaction_date 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 = \"Event-driven\" order by transaction_date asc limit 1 " }, { "id": 5862, "SQL": "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,\"Fluorocarbon gases manufacturing\") and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 5863, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Amy Robinson\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 5864, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') group by billing_city" }, { "id": 5865, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 5866, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sean Burke\" ) " }, { "id": 5867, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jeremy Alexander\"" }, { "id": 5868, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"James Kaiser\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 5869, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"William Hunter\" and account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 5870, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Meals and Entertainment\") and vendor = \"Chelsea Wood\"" }, { "id": 5871, "SQL": "select transaction_id from master_txn_table where product_service = \"Software Training\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 5872, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 5873, "SQL": "select sum(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Meal\" " }, { "id": 5874, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Donald Pierce\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 5875, "SQL": "select transaction_id from master_txn_table where customers = \"Travis Hicks\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 5876, "SQL": "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,\"Accounts Payable (A/P)\") and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 5877, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Heather Oliver\" ) " }, { "id": 5878, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 5879, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") group by product_service order by sum(credit) desc limit 1" }, { "id": 5880, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Paula Larson\" ) " }, { "id": 5881, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Kathy Cervantes\" and transaction_type = 'invoice'" }, { "id": 5882, "SQL": "select transaction_date from master_txn_table where customers = \"Douglas Jimenez\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 5883, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 5884, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 5885, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jorge Eaton\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 5886, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 5887, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Richard Thompson\" ) " }, { "id": 5888, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 5889, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 5890, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Kelsey Mcgrath\" and transaction_type = 'payment' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') ) " }, { "id": 5891, "SQL": "select transaction_id from master_txn_table where customers = \"Melanie Chang\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 5892, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jeanne Herman\" ) " }, { "id": 5893, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 5894, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Kelly Francis\"" }, { "id": 5895, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Kim Stokes\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") )" }, { "id": 5896, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sarah Santos\" ) " }, { "id": 5897, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Business services centers\") and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 5898, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"David Terry\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 5899, "SQL": "select transaction_date 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 = \"Hydrogen\" order by transaction_date asc limit 1 " }, { "id": 5900, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Uncategorized Expense\") and vendor = \"Jimmy Conner\"" }, { "id": 5901, "SQL": "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,\"Design and management services\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 5902, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Andre Riley\" and transaction_type = 'payment' 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') )" }, { "id": 5903, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Greg Olson\" ) " }, { "id": 5904, "SQL": "select product_service, 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 transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') group by product_service order by sum(credit) desc limit 1" }, { "id": 5905, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"John Cooper\" ) " }, { "id": 5906, "SQL": "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,\"Constructing bangalow\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 5907, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 5908, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Juan Golden\"" }, { "id": 5909, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Auto mobiles\" " }, { "id": 5910, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kristin Thomas\" ) " }, { "id": 5911, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Providing other outdoor maintenance services\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 5912, "SQL": "select max(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 = \"Andrea Murillo\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 5913, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Other non-renewable power generation\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 5914, "SQL": "select transaction_date 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 = \"Teen outreach\" order by transaction_date asc limit 1 " }, { "id": 5915, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 5916, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Andrew Russell\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 5917, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 5918, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 5919, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"David Benjamin\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 5920, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Christina Jackson\" ) " }, { "id": 5921, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Dining\" " }, { "id": 5922, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Michael Nguyen\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 5923, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 5924, "SQL": "select transaction_id from master_txn_table where product_service = \"Hacking Training\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 5925, "SQL": "select sum(credit) from master_txn_table where product_service = \"Wardrobe\" and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 5926, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Erica Oliver\" ) " }, { "id": 5927, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') and account_type in ('Expense','Other Expense') " }, { "id": 5928, "SQL": "select transaction_date from master_txn_table where customers = \"Ruth Archer\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 5929, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Tracy Krause\" ) " }, { "id": 5930, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brandi Baldwin\" ) " }, { "id": 5931, "SQL": "select transaction_date 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 = \"Macro\" order by transaction_date asc limit 1 " }, { "id": 5932, "SQL": "select transaction_id from master_txn_table where customers = \"Gary Kelly\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 5933, "SQL": "select transaction_id from master_txn_table where customers = \"Adrienne Mason\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 5934, "SQL": "select transaction_date 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 = \"Spearmint oil\" order by transaction_date asc limit 1 " }, { "id": 5935, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Alice Horton\"" }, { "id": 5936, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") group by product_service order by sum(credit) desc limit 1" }, { "id": 5937, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 5938, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Warren Marquez\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 5939, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Susan Sanchez\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 5940, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Alex Hart\" ) " }, { "id": 5941, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Elaine Hines\" order by transaction_date limit 1" }, { "id": 5942, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 5943, "SQL": "select max(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 = \"Heather Ferguson DDS\" and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 5944, "SQL": "select transaction_date from master_txn_table where customers = \"Jennifer Wells\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 5945, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Mitchell Watts\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date) AND date(current_date) )" }, { "id": 5946, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 5947, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Pamela Doyle\" ) " }, { "id": 5948, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Popular music shows\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 5949, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Danielle Smith\" order by transaction_date limit 1" }, { "id": 5950, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Patricia Gentry\" order by transaction_date limit 1" }, { "id": 5951, "SQL": "select sum(credit) from master_txn_table where product_service = \"Towboat\" and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 5952, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 5953, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 5954, "SQL": "select transaction_date from master_txn_table where customers = \"Andrea Norris\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 5955, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Louis Robinson\" ) " }, { "id": 5956, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Jacob Wells\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') )" }, { "id": 5957, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Isaiah Burch\"" }, { "id": 5958, "SQL": "select transaction_date 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 = \"homebuilders\" order by transaction_date asc limit 1 " }, { "id": 5959, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Margaret Murphy\" ) " }, { "id": 5960, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Meredith Mcconnell\"" }, { "id": 5961, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jeremy Lester\" ) " }, { "id": 5962, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Non-renewable\" " }, { "id": 5963, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Lori Kim\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 5964, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Quality assessment\" " }, { "id": 5965, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Whitney Gordon\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 5966, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Lynn Phillips\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 5967, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Gregory Long\" order by transaction_date limit 1" }, { "id": 5968, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Home therapy services\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 5969, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ryan Savage\" ) " }, { "id": 5970, "SQL": "select transaction_date from master_txn_table where customers = \"Christy Carlson\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 5971, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Julia Cobb\"" }, { "id": 5972, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 5973, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') and account_type in ('Expense','Other Expense') " }, { "id": 5974, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Samuel Guzman\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) ) " }, { "id": 5975, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Todd Harrell' or vendor = 'Todd Harrell'" }, { "id": 5976, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Ariel Phelps\"" }, { "id": 5977, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Phillip Haynes' or vendor = 'Phillip Haynes'" }, { "id": 5978, "SQL": "select sum(credit) from master_txn_table where product_service = \"Construction activities\" and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 5979, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 5980, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Mary Shaw\" ) " }, { "id": 5981, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Tanker rental or leasing\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 5982, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 5983, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jasmine Wright\" ) " }, { "id": 5984, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jason Michael\" ) " }, { "id": 5985, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Web hosting\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 5986, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 5987, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 5988, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 5989, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 5990, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Crystal Brown\"" }, { "id": 5991, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sarah Cortez\" ) " }, { "id": 5992, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 5993, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Danny Gibson\" and transaction_type = 'invoice'" }, { "id": 5994, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Taylor Jacobs\" and transaction_type = 'invoice'" }, { "id": 5995, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brent Serrano\" ) " }, { "id": 5996, "SQL": "select sum(credit) from master_txn_table where product_service = \"AI Courses\" and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 5997, "SQL": "select transaction_date 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 = \"Social activities\" order by transaction_date asc limit 1 " }, { "id": 5998, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 5999, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 6000, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Erik Martin\" and transaction_type = 'payment' and 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') )" }, { "id": 6001, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 6002, "SQL": "select transaction_date 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 = \"Marine Supplies\" order by transaction_date asc limit 1 " }, { "id": 6003, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jennifer Higgins\" order by transaction_date limit 1" }, { "id": 6004, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Courtney Paul\" and transaction_type = 'invoice'" }, { "id": 6005, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 6006, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Laura Schwartz\" ) " }, { "id": 6007, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Offering distressed securities funds\") and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 6008, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Tina Coleman\"" }, { "id": 6009, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name 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 account_type in ('Expense','Other Expense') " }, { "id": 6010, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Kelly Carpenter\" and transaction_type = 'payment' and 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') )" }, { "id": 6011, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Installation\") and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 6012, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Sean Murray' or vendor = 'Sean Murray'" }, { "id": 6013, "SQL": "select transaction_date from master_txn_table where customers = \"Cassandra Pena\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 6014, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Ann Brown\" order by transaction_date limit 1" }, { "id": 6015, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Application service provider services\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 6016, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Michael Roberts\"" }, { "id": 6017, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") group by billing_city" }, { "id": 6018, "SQL": "select transaction_id from master_txn_table where customers = \"Michael Rush\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 6019, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Joshua Walker\" and transaction_type = 'payment' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') )" }, { "id": 6020, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 6021, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 6022, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"James Castro\" ) " }, { "id": 6023, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Angela Johnson\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) )" }, { "id": 6024, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Julia Martinez' or vendor = 'Julia Martinez'" }, { "id": 6025, "SQL": "select transaction_id from master_txn_table where customers = \"Bonnie Tran\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 6026, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Installation\") and vendor = \"Michelle Garrett\"" }, { "id": 6027, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 6028, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Lance Maldonado\"" }, { "id": 6029, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Leslie Rodriguez\" ) " }, { "id": 6030, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Maureen Everett\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 6031, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by billing_city" }, { "id": 6032, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 6033, "SQL": "select sum(credit) from master_txn_table where product_service = \"Dining\" and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 6034, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 6035, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Jennifer Harvey' or vendor = 'Jennifer Harvey'" }, { "id": 6036, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Janet Myers\" ) " }, { "id": 6037, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 6038, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Service Provisioning\" " }, { "id": 6039, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Melissa Taylor\"" }, { "id": 6040, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') order by sum(debit) desc limit 1" }, { "id": 6041, "SQL": "select transaction_date 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 = \"Packaging and labeling\" order by transaction_date asc limit 1 " }, { "id": 6042, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 6043, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 6044, "SQL": "select transaction_date 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 = \"Nonmetallic mineral ore\" order by transaction_date asc limit 1 " }, { "id": 6045, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Decks and Patios\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 6046, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Tara Contreras\" and transaction_type = 'payment' and 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') )" }, { "id": 6047, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 6048, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 6049, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 6050, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Joseph Brown\" ) " }, { "id": 6051, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 6052, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Labor\") and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 6053, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") group by billing_city" }, { "id": 6054, "SQL": "select transaction_date from master_txn_table where customers = \"Benjamin Holmes\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 6055, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 6056, "SQL": "select sum(credit) from master_txn_table where product_service = \"Inorganic Gases\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 6057, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Beverly Elliott\"" }, { "id": 6058, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Samuel Lozano\"" }, { "id": 6059, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Other essential oils\" " }, { "id": 6060, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 6061, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by billing_city" }, { "id": 6062, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Window washing\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 6063, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Drain cleaning\" " }, { "id": 6064, "SQL": "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,\"Registration for tournaments and matches\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 6065, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Samantha Burke\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 6066, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Commissions & fees\") and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 6067, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 6068, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Marie Fowler\" ) " }, { "id": 6069, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 6070, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Kayla Jimenez\" order by transaction_date limit 1" }, { "id": 6071, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 6072, "SQL": "select transaction_date 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 = \"Aeronautical Equipment\" order by transaction_date asc limit 1 " }, { "id": 6073, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Christopher Mcguire\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 6074, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 6075, "SQL": "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,\"Equipment Repairs\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 6076, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Cathy Rodriguez\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 6077, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Fuel\") and vendor = \"Gary Ward\"" }, { "id": 6078, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by billing_city" }, { "id": 6079, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Providing support services for commodity markets\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 6080, "SQL": "select transaction_id from master_txn_table where customers = \"Jennifer Hickman\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 6081, "SQL": "select transaction_date from master_txn_table where customers = \"Sandra Hawkins\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 6082, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jeffrey Serrano\" ) " }, { "id": 6083, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Robert Gibbs\"" }, { "id": 6084, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 6085, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Joseph Green\" order by transaction_date limit 1" }, { "id": 6086, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Herbert Keith\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 6087, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Repair & Maintenance (deleted)\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 6088, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Marie Herring\"" }, { "id": 6089, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Leah Diaz\" ) " }, { "id": 6090, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and 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') group by billing_city" }, { "id": 6091, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Other sporting goods retailing\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 6092, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Paula Robertson\" ) " }, { "id": 6093, "SQL": "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,\"Helium manufacturing\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 6094, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Benjamin Brewer\" ) " }, { "id": 6095, "SQL": "select product_service, 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 transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') group by product_service order by sum(credit) desc limit 1" }, { "id": 6096, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Julia Gonzalez\" ) " }, { "id": 6097, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') order by sum(debit) desc limit 1" }, { "id": 6098, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Randy White\" ) " }, { "id": 6099, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Christopher Parks' or vendor = 'Christopher Parks'" }, { "id": 6100, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 6101, "SQL": "select sum(credit) from master_txn_table where product_service = \"Commodity Markets\" and 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') " }, { "id": 6102, "SQL": "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 = \"Sara Lyons\" and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 6103, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 6104, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Richard Martinez\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') )" }, { "id": 6105, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Calvin Moreno\" order by transaction_date limit 1" }, { "id": 6106, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 6107, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 6108, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date) AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 6109, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Kevin Quinn\"" }, { "id": 6110, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Philip Garcia\" and transaction_type = 'invoice'" }, { "id": 6111, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Douglas Rodriguez\" and transaction_type = 'invoice'" }, { "id": 6112, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Cheryl Russo\" ) " }, { "id": 6113, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Blueprinting services\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 6114, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Angela Foley\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') ) " }, { "id": 6115, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Eddie Bowman\" ) " }, { "id": 6116, "SQL": "select sum(credit) from master_txn_table where product_service = \"Chairs\" and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 6117, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Maria Hernandez\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) ) " }, { "id": 6118, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Robert Solis\" ) " }, { "id": 6119, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Fishing\" " }, { "id": 6120, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 6121, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 6122, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Benjamin Thomas\" ) " }, { "id": 6123, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Ships\" " }, { "id": 6124, "SQL": "select transaction_date 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 = \"Steno class\" order by transaction_date asc limit 1 " }, { "id": 6125, "SQL": "select transaction_date 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 = \"Sleepers\" order by transaction_date asc limit 1 " }, { "id": 6126, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Rhonda Young\"" }, { "id": 6127, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Veronica Wagner\" and transaction_type = 'invoice'" }, { "id": 6128, "SQL": "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,\"Baby furniture\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 6129, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"James Patton\"" }, { "id": 6130, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Nancy Conner\" ) " }, { "id": 6131, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Providing other outdoor maintenance services\" " }, { "id": 6132, "SQL": "select transaction_id from master_txn_table where product_service = \"Spraying\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 6133, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Howard Allen\" and transaction_type = 'payment' 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') ) " }, { "id": 6134, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 6135, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 6136, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 6137, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Matthew Bowen\" ) " }, { "id": 6138, "SQL": "select sum(credit) from master_txn_table where product_service = \"Coffee and Snack\" and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 6139, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Trevor Jenkins\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 6140, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Drilling oil and gas wells\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 6141, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Bryan Medina\"" }, { "id": 6142, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Steven Skinner\"" }, { "id": 6143, "SQL": "select transaction_id from master_txn_table where product_service = \"Camping and Parking\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 6144, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Neil Mejia\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 6145, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 6146, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Justin Wells\"" }, { "id": 6147, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Nicholas Green\" ) " }, { "id": 6148, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 6149, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Denise Vaughn\" ) " }, { "id": 6150, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Providing personal care\") 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') " }, { "id": 6151, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Paul Flynn\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') )" }, { "id": 6152, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Chris Mack\"" }, { "id": 6153, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Miscellaneous\" " }, { "id": 6154, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Nancy Irwin\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') )" }, { "id": 6155, "SQL": "select transaction_id from master_txn_table where customers = \"Linda Woods\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 6156, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Allison Clark\" ) " }, { "id": 6157, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by billing_city" }, { "id": 6158, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 6159, "SQL": "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,\"Private mailbox rental centers\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 6160, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Non-musical performances\") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 6161, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 6162, "SQL": "select transaction_date 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 = \"Emerging Market\" order by transaction_date asc limit 1 " }, { "id": 6163, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ann Bridges\" ) " }, { "id": 6164, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Kara Richardson\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 6165, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') group by billing_city" }, { "id": 6166, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 6167, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 6168, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Bradley Gutierrez\" ) " }, { "id": 6169, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 6170, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Diapers\" " }, { "id": 6171, "SQL": "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 renewable-fueled power generation\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 6172, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Danielle Brown\" ) " }, { "id": 6173, "SQL": "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,\"Unapplied Cash Payment Income\") 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') " }, { "id": 6174, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Monica Vaughn' or vendor = 'Monica Vaughn'" }, { "id": 6175, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Towboat\" " }, { "id": 6176, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Shannon Combs\" ) " }, { "id": 6177, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Brandy Gates\" and account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 6178, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date) AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 6179, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Duane Davis\"" }, { "id": 6180, "SQL": "select transaction_id from master_txn_table where product_service = \"Financial Investment\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 6181, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 6182, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Offering event-driven funds\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 6183, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Melissa Tate' or vendor = 'Melissa Tate'" }, { "id": 6184, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Zachary Marshall\"" }, { "id": 6185, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Livestock health services\") and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 6186, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') order by sum(debit) desc limit 1" }, { "id": 6187, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Project planning and economic assessments\") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 6188, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 6189, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Julia Valencia\" ) " }, { "id": 6190, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Susan Flores\" ) " }, { "id": 6191, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Michelle Martinez\" ) " }, { "id": 6192, "SQL": "select transaction_date from master_txn_table where customers = \"Dylan Chandler\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 6193, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 6194, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Project planning and economic assessments\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 6195, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") group by billing_city" }, { "id": 6196, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Janice Mcmillan\" and transaction_type = 'payment' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') ) " }, { "id": 6197, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 6198, "SQL": "select transaction_date from master_txn_table where customers = \"Patrick Singleton\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 6199, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Tony Cooper\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) ) " }, { "id": 6200, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 6201, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Brent Barrera\"" }, { "id": 6202, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 6203, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Jennifer Kelley MD\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 6204, "SQL": "select transaction_date 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 = \"Computer Programming\" order by transaction_date asc limit 1 " }, { "id": 6205, "SQL": "select product_service, 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 transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') group by product_service order by sum(credit) desc limit 1" }, { "id": 6206, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 6207, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Dawn Nelson\" and transaction_type = 'invoice'" }, { "id": 6208, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Mary Meyer\" order by transaction_date limit 1" }, { "id": 6209, "SQL": "select transaction_date from master_txn_table where customers = \"Kyle Hooper\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 6210, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 6211, "SQL": "select transaction_id from master_txn_table where customers = \"Vanessa Lopez\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 6212, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sharon Guzman\" ) " }, { "id": 6213, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Travel Meals\") and vendor = \"Charles White\"" }, { "id": 6214, "SQL": "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,\"Acetylene manufacturing\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 6215, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 6216, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Entertainment\" " }, { "id": 6217, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 6218, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Monica Wagner\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 6219, "SQL": "select transaction_date from master_txn_table where customers = \"Melissa Lewis\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 6220, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') group by billing_city" }, { "id": 6221, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 6222, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brittney Massey\" ) " }, { "id": 6223, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sean Vega\" ) " }, { "id": 6224, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 6225, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Darlene Castaneda\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") )" }, { "id": 6226, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Dawn Garcia\"" }, { "id": 6227, "SQL": "select transaction_date 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 = \"Nonfossil-fuel\" order by transaction_date asc limit 1 " }, { "id": 6228, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Gifts and grants\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 6229, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"James Thomas\" ) " }, { "id": 6230, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 6231, "SQL": "select transaction_id from master_txn_table where customers = \"Norma Jimenez\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 6232, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 6233, "SQL": "select sum(credit) from master_txn_table where product_service = \"Lemon oil\" and 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') " }, { "id": 6234, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"James Diaz\" ) " }, { "id": 6235, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Cynthia Collier\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 6236, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 6237, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 6238, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Cost of Labor\") and vendor = \"Ebony Ray\"" }, { "id": 6239, "SQL": "select transaction_date from master_txn_table where customers = \"Alyssa Hodge\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 6240, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Joseph Rodriguez\" ) " }, { "id": 6241, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Mary Horn\" ) " }, { "id": 6242, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Andrew Miller\" order by transaction_date limit 1" }, { "id": 6243, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Tracy Miller\" and transaction_type = 'payment' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') )" }, { "id": 6244, "SQL": "select transaction_date 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 = \"Shunting trailers\" order by transaction_date asc limit 1 " }, { "id": 6245, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Dylan Wallace\"" }, { "id": 6246, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') and account_type in ('Expense','Other Expense') " }, { "id": 6247, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Whitney Ruiz\" ) " }, { "id": 6248, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Michelle Sparks\" ) " }, { "id": 6249, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Retailing Wardrobe\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 6250, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 6251, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) group by billing_city" }, { "id": 6252, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Artificial Intelligence Courses\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 6253, "SQL": "select sum(credit) from master_txn_table where product_service = \"Coal Pwer\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 6254, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 6255, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Denise Lewis\" ) " }, { "id": 6256, "SQL": "select sum(credit) from master_txn_table where product_service = \"LAN\" and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 6257, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ashley Nielsen\" ) " }, { "id": 6258, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Andrea Dixon\" ) " }, { "id": 6259, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 6260, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 6261, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Megan Adams\" order by transaction_date limit 1" }, { "id": 6262, "SQL": "select product_service, 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 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') group by product_service order by sum(credit) desc limit 1" }, { "id": 6263, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 6264, "SQL": "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 construction activities\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 6265, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Dwayne Potts\" ) " }, { "id": 6266, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 6267, "SQL": "select transaction_date 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 = \"Shunting trailers\" order by transaction_date asc limit 1 " }, { "id": 6268, "SQL": "select transaction_date from master_txn_table where customers = \"Gregory Farrell\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 6269, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Development of software products for automobiles\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 6270, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Timothy Marquez\" ) " }, { "id": 6271, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Yesenia Martinez\" ) " }, { "id": 6272, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Joshua Guerrero\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') ) " }, { "id": 6273, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 6274, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Raymond Moore\" ) " }, { "id": 6275, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by billing_city" }, { "id": 6276, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 6277, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Holly Jones\" ) " }, { "id": 6278, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Spraying services\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 6279, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Ethical Hacking Training\") and 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') " }, { "id": 6280, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Rebecca Horn\"" }, { "id": 6281, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Michael White DVM\" order by transaction_date limit 1" }, { "id": 6282, "SQL": "select transaction_id from master_txn_table where product_service = \"Financial Investment\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 6283, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 6284, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Jeffrey Turner\" and transaction_type = 'payment' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') )" }, { "id": 6285, "SQL": "select sum(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Farrier\" " }, { "id": 6286, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Kenneth Blevins\" order by transaction_date limit 1" }, { "id": 6287, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jennifer Tyler\" ) " }, { "id": 6288, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Shane Lee\" ) " }, { "id": 6289, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 6290, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Margaret Chavez\" order by transaction_date limit 1" }, { "id": 6291, "SQL": "select max(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 = \"Julie Gill\" and 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') " }, { "id": 6292, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Grant Erickson\" ) " }, { "id": 6293, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Nancy Fisher\" ) " }, { "id": 6294, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Andrew Ballard\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) ) " }, { "id": 6295, "SQL": "select transaction_date from master_txn_table where customers = \"Ronald Graham\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 6296, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 6297, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jesse Johnston\" ) " }, { "id": 6298, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Rodney Bishop\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 6299, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Opera\" " }, { "id": 6300, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Theresa Jordan\" ) " }, { "id": 6301, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Pamela Hurst\" ) " }, { "id": 6302, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 6303, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Alexandra Wall\" ) " }, { "id": 6304, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"John Galloway\" ) " }, { "id": 6305, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Sierra Huber\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 6306, "SQL": "select transaction_id from master_txn_table where product_service = \"Cleaning\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 6307, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and 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') group by billing_city" }, { "id": 6308, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Tanya Strickland\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 6309, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Duct and gutter cleaning\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 6310, "SQL": "select transaction_date 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 = \"Casings, Tubes and Rods\" order by transaction_date asc limit 1 " }, { "id": 6311, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Wanda Salazar\" ) " }, { "id": 6312, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Christina Lynch\" ) " }, { "id": 6313, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Kim Sims\" order by transaction_date limit 1" }, { "id": 6314, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Vernon Reynolds\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 6315, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Laura Dillon\" ) " }, { "id": 6316, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 6317, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Brittany Mullen\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") ) " }, { "id": 6318, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 6319, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Karen Mitchell\" order by transaction_date limit 1" }, { "id": 6320, "SQL": "select transaction_date 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 = \"Equity long/short\" order by transaction_date asc limit 1 " }, { "id": 6321, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jason Livingston\" ) " }, { "id": 6322, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Katie Nixon\" ) " }, { "id": 6323, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and 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') order by sum(debit) desc limit 1" }, { "id": 6324, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Offering event-driven funds\") and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 6325, "SQL": "select sum(credit) from master_txn_table where product_service = \"AI Courses\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 6326, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Spraying services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 6327, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 6328, "SQL": "select transaction_date from master_txn_table where customers = \"Mary Sanchez\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 6329, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Maria Jenkins\" ) " }, { "id": 6330, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 6331, "SQL": "select transaction_id from master_txn_table where product_service = \"Social activities\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 6332, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Randy Fleming\" ) " }, { "id": 6333, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Casings, Tubes and Rods\" " }, { "id": 6334, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Daily living assistance\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 6335, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 6336, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Amber Foster\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date) AND date(current_date) ) " }, { "id": 6337, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 6338, "SQL": "select transaction_date from master_txn_table where customers = \"Kayla Cruz\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 6339, "SQL": "select transaction_date 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 = \"Golf Equipment\" order by transaction_date asc limit 1 " }, { "id": 6340, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Andrea Mcclure\"" }, { "id": 6341, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Daniel Vazquez\"" }, { "id": 6342, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Jessica Davis\" and account_type in ('Expense','Other Expense') and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 6343, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sean Harper\" ) " }, { "id": 6344, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Shane Martin' or vendor = 'Shane Martin'" }, { "id": 6345, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name 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 account_type in ('Expense','Other Expense') " }, { "id": 6346, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Retailing master bedroom furniture\") and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 6347, "SQL": "select sum(credit) from master_txn_table where product_service = \"Oil and gas wells\" and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 6348, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Taylor Parker\" ) " }, { "id": 6349, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Darryl Guerrero\" ) " }, { "id": 6350, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 6351, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Carol Callahan\" ) " }, { "id": 6352, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Tonya Miller\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') ) " }, { "id": 6353, "SQL": "select transaction_id from master_txn_table where product_service = \"Peppermint oil\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 6354, "SQL": "select transaction_date from master_txn_table where customers = \"Matthew Guzman\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 6355, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 6356, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lindsay Snyder\" ) " }, { "id": 6357, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 6358, "SQL": "select transaction_date from master_txn_table where customers = \"Nicholas Taylor\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 6359, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 6360, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 6361, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 6362, "SQL": "select transaction_date from master_txn_table where customers = \"Brenda Watson\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 6363, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") group by billing_city" }, { "id": 6364, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Emily Alexander\" ) " }, { "id": 6365, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Joshua Gomez\" order by transaction_date limit 1" }, { "id": 6366, "SQL": "select transaction_id from master_txn_table where customers = \"Jacqueline Robbins\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 6367, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 6368, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 6369, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Barbara Miranda\" ) " }, { "id": 6370, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Jesse Kirk\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') )" }, { "id": 6371, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Tyler Smith\"" }, { "id": 6372, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') group by product_service order by sum(credit) desc limit 1" }, { "id": 6373, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Bryan Davis\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 6374, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kathleen Logan\" ) " }, { "id": 6375, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Charles Mills\" order by transaction_date limit 1" }, { "id": 6376, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Providing courses through business schools\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 6377, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 6378, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 6379, "SQL": "select transaction_id from master_txn_table where customers = \"Jenny Williams\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 6380, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by billing_city" }, { "id": 6381, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Fees Billed\") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 6382, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Coordinators\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 6383, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Daily living assistance\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 6384, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Sandra Hawkins\" order by transaction_date limit 1" }, { "id": 6385, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kristen Holland\" ) " }, { "id": 6386, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Data storage and management services\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 6387, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Heather Cox\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 6388, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') group by billing_city" }, { "id": 6389, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"William Reeves\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) ) " }, { "id": 6390, "SQL": "select transaction_date from master_txn_table where customers = \"Mark Murray\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 6391, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date) AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 6392, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kari Carpenter\" ) " }, { "id": 6393, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Nicole Jimenez\" and transaction_type = 'invoice'" }, { "id": 6394, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Waste-fueled\" " }, { "id": 6395, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Purchases\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 6396, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Jeremy Gibson\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 6397, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Laurie Moore\" ) " }, { "id": 6398, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') order by sum(debit) desc limit 1" }, { "id": 6399, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Drain cleaning\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 6400, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Dylan Dunn\"" }, { "id": 6401, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 6402, "SQL": "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,\"Adoption placement services\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 6403, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 6404, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 6405, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Sherri Bass\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") ) " }, { "id": 6406, "SQL": "select transaction_id from master_txn_table where product_service = \"Aircraft\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 6407, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Donna Gonzalez\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 6408, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Maria Elliott\" order by transaction_date limit 1" }, { "id": 6409, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 6410, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Gary Mason\" ) " }, { "id": 6411, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Offering distressed securities funds\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 6412, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Paul Eaton\" ) " }, { "id": 6413, "SQL": "select transaction_date from master_txn_table where customers = \"Rodney Thomas\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 6414, "SQL": "select transaction_id from master_txn_table where product_service = \"Mailbox Services\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 6415, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 6416, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Jerry Doyle\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) ) " }, { "id": 6417, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Christopher Perez' or vendor = 'Christopher Perez'" }, { "id": 6418, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Chelsea Barnes\" order by transaction_date limit 1" }, { "id": 6419, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Caroline Cook\" and transaction_type = 'invoice'" }, { "id": 6420, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Morgan Haney\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 6421, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 6422, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Monica Murphy\" ) " }, { "id": 6423, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Gabrielle Lester\" ) " }, { "id": 6424, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Ethan Sherman\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 6425, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 6426, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 6427, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Parking lot and driveway washing\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 6428, "SQL": "select transaction_date 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 = \"Furniture\" order by transaction_date asc limit 1 " }, { "id": 6429, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 6430, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by billing_city" }, { "id": 6431, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Raymond Johnson\" order by transaction_date limit 1" }, { "id": 6432, "SQL": "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,\"Exercise equipment retailing\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 6433, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Allen Fisher\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 6434, "SQL": "select transaction_date 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 = \"Swimming pool Cleaning\" order by transaction_date asc limit 1 " }, { "id": 6435, "SQL": "select transaction_date 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 = \"Railroad Cars\" order by transaction_date asc limit 1 " }, { "id": 6436, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Michael Lee\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 6437, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kelly Kennedy\" ) " }, { "id": 6438, "SQL": "select transaction_date from master_txn_table where customers = \"Dale Carroll\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 6439, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 6440, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Timothy Lewis\"" }, { "id": 6441, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jessica Little\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 6442, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Lisa Green\" and transaction_type = 'invoice'" }, { "id": 6443, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 6444, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Elizabeth Mcdaniel\" ) " }, { "id": 6445, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Robert Dudley\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) ) " }, { "id": 6446, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 6447, "SQL": "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,\"Offering equity long/short \") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 6448, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name 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 account_type in ('Expense','Other Expense') " }, { "id": 6449, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Brittany Sheppard\"" }, { "id": 6450, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 6451, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by billing_city" }, { "id": 6452, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Meghan Ortega\"" }, { "id": 6453, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 6454, "SQL": "select transaction_date from master_txn_table where customers = \"Frederick Cox\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 6455, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Felicia Moreno\" ) " }, { "id": 6456, "SQL": "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 = \"Dennis Mueller\" and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 6457, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 6458, "SQL": "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,\"Motorbike \") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 6459, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Kari Stephens DVM\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 6460, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Rebekah Yoder\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 6461, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Melissa Olson\" ) " }, { "id": 6462, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 6463, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 6464, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 6465, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jeanette Lindsey\" order by transaction_date limit 1" }, { "id": 6466, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Kiara Raymond\" order by transaction_date limit 1" }, { "id": 6467, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Richard Wells\" ) " }, { "id": 6468, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Heather Hernandez\"" }, { "id": 6469, "SQL": "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,\"Recognition software for the auto sector\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 6470, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Thomas Fields' or vendor = 'Thomas Fields'" }, { "id": 6471, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Brittany Brandt\"" }, { "id": 6472, "SQL": "select transaction_id from master_txn_table where product_service = \"Aeronautical Equipment\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 6473, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Deborah Delgado\" ) " }, { "id": 6474, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Shawn Taylor\" ) " }, { "id": 6475, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 6476, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Jonathan Bean\" and transaction_type = 'payment' 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') ) " }, { "id": 6477, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Retailing stationary sofas/sofa-sleepers\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 6478, "SQL": "select avg(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 = \"Julian Richardson\" and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 6479, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 6480, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Phillip Davis\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') )" }, { "id": 6481, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jasmine Gallegos\" ) " }, { "id": 6482, "SQL": "select transaction_date from master_txn_table where customers = \"Charles Reyes\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 6483, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Dawn Barnes\" and transaction_type = 'invoice'" }, { "id": 6484, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 6485, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Equity long/short\" " }, { "id": 6486, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 6487, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Luis Myers\" order by transaction_date limit 1" }, { "id": 6488, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Christopher Long\" ) " }, { "id": 6489, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 6490, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Joseph Jackson\" ) " }, { "id": 6491, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') order by sum(debit) desc limit 1" }, { "id": 6492, "SQL": "select transaction_date from master_txn_table where customers = \"Daniel Mccormick\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 6493, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Cindy Hall\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) ) " }, { "id": 6494, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Decks and Patios\") and 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') " }, { "id": 6495, "SQL": "select transaction_date 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 = \"Ventilation cleaning\" order by transaction_date asc limit 1 " }, { "id": 6496, "SQL": "select transaction_id from master_txn_table where customers = \"Seth Savage\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 6497, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 6498, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 6499, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Tiffany Carrillo\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 6500, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 6501, "SQL": "select transaction_date from master_txn_table where customers = \"Daniel Rose\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 6502, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 6503, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Inorganic Gases\" " }, { "id": 6504, "SQL": "select sum(credit) from master_txn_table where product_service = \"Chairs\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 6505, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lisa Mcmahon\" ) " }, { "id": 6506, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Manufacturing other Synthetic Oils\") and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 6507, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Dale Bright\"" }, { "id": 6508, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where 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') and account_type in ('Expense','Other Expense') " }, { "id": 6509, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Annette Brown\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) )" }, { "id": 6510, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Cynthia Lee\"" }, { "id": 6511, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Aaron Armstrong\" ) " }, { "id": 6512, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Bank Charges\") and vendor = \"Danielle Caldwell\"" }, { "id": 6513, "SQL": "select transaction_date 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 = \"Steno class\" order by transaction_date asc limit 1 " }, { "id": 6514, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 6515, "SQL": "select transaction_id from master_txn_table where customers = \"Monica Buchanan\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 6516, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jennifer Fields\" ) " }, { "id": 6517, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Danielle Butler\"" }, { "id": 6518, "SQL": "select transaction_date 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 = \"Housing\" order by transaction_date asc limit 1 " }, { "id": 6519, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Swimming pool Cleaning\" " }, { "id": 6520, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Other Income\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 6521, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Stacy Chase\" ) " }, { "id": 6522, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 6523, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 6524, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Edwin Cooper\"" }, { "id": 6525, "SQL": "select max(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 = \"Megan Davis\" and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 6526, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Julie Brown\" order by transaction_date limit 1" }, { "id": 6527, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Geothermal\" " }, { "id": 6528, "SQL": "select transaction_date from master_txn_table where customers = \"Trevor King\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 6529, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 6530, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ryan Miller\" ) " }, { "id": 6531, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Rose Hanson\" ) " }, { "id": 6532, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Providing other outdoor maintenance services\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 6533, "SQL": "select transaction_id from master_txn_table where customers = \"Tyler Williams\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 6534, "SQL": "select transaction_date from master_txn_table where customers = \"Kimberly Lindsey\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 6535, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Joshua Blackwell\"" }, { "id": 6536, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Paula Farrell\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 6537, "SQL": "select min(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 = \"Angela Todd\" and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 6538, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kristi Wallace\" ) " }, { "id": 6539, "SQL": "select transaction_date from master_txn_table where customers = \"Bradley Kennedy\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 6540, "SQL": "select transaction_date 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 = \"Orange oil\" order by transaction_date asc limit 1 " }, { "id": 6541, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and 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') " }, { "id": 6542, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lucas Castillo\" ) " }, { "id": 6543, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'James Beard' or vendor = 'James Beard'" }, { "id": 6544, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Jeffery Jones\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") ) " }, { "id": 6545, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 6546, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"William Good\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 6547, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Amanda Oneal\"" }, { "id": 6548, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 6549, "SQL": "select transaction_date from master_txn_table where customers = \"Cody Rivera MD\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 6550, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 6551, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Gary Davidson\" ) " }, { "id": 6552, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Bryan Sullivan\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 6553, "SQL": "select sum(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Toys\" " }, { "id": 6554, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Hector Moore\" ) " }, { "id": 6555, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and 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') " }, { "id": 6556, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') and account_type in ('Expense','Other Expense') " }, { "id": 6557, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 6558, "SQL": "select transaction_date from master_txn_table where customers = \"Sharon Scott\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 6559, "SQL": "select transaction_id from master_txn_table where product_service = \"Opera\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 6560, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 6561, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Jack Wells' or vendor = 'Jack Wells'" }, { "id": 6562, "SQL": "select sum(credit) from master_txn_table where product_service = \"Document Copying\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 6563, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 6564, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and 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') " }, { "id": 6565, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 6566, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Daniel Sutton\" ) " }, { "id": 6567, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Sydney Henson\" and transaction_type = 'invoice'" }, { "id": 6568, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Victoria Bass\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 6569, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Corey Sampson\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 6570, "SQL": "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 = \"Edward Miller\" and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 6571, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Justin Cowan\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 6572, "SQL": "select transaction_id from master_txn_table where customers = \"Isaiah Dunlap\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 6573, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by billing_city" }, { "id": 6574, "SQL": "select transaction_date 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 = \"Wardrobe\" order by transaction_date asc limit 1 " }, { "id": 6575, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Stephanie Horn\"" }, { "id": 6576, "SQL": "select sum(credit) from master_txn_table where product_service = \"Coffee and Snack\" and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 6577, "SQL": "select transaction_date 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 = \"Business management\" order by transaction_date asc limit 1 " }, { "id": 6578, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 6579, "SQL": "select transaction_date from master_txn_table where customers = \"Jennifer Stafford\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 6580, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 6581, "SQL": "select transaction_id from master_txn_table where product_service = \"Boat\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 6582, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Installation\") and vendor = \"Natalie Valencia\"" }, { "id": 6583, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Billable Expense Income\") and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 6584, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Billy Rodriguez' or vendor = 'Billy Rodriguez'" }, { "id": 6585, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Providing classes in stenography and court reporting\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 6586, "SQL": "select transaction_id from master_txn_table where product_service = \"Furniture\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 6587, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sara Hopkins\" ) " }, { "id": 6588, "SQL": "select transaction_id from master_txn_table where customers = \"Regina Knight\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 6589, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Amber Russell\" order by transaction_date limit 1" }, { "id": 6590, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Christine Hernandez\"" }, { "id": 6591, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 6592, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') and account_type in ('Expense','Other Expense') " }, { "id": 6593, "SQL": "select product_service, 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 transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') group by product_service order by sum(credit) desc limit 1" }, { "id": 6594, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 6595, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Baby car seats\") and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 6596, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 6597, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Jacob Carter\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') ) " }, { "id": 6598, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 6599, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Invitations\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 6600, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Retailing Wardrobe\") and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 6601, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' 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') " }, { "id": 6602, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Chloe Reed\" and transaction_type = 'invoice'" }, { "id": 6603, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Craig Wright\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 6604, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Kyle Flores\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) ) " }, { "id": 6605, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jodi Thompson\" ) " }, { "id": 6606, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') order by sum(debit) desc limit 1" }, { "id": 6607, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Sharon Burnett\"" }, { "id": 6608, "SQL": "select transaction_date from master_txn_table where customers = \"Christopher Becker\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 6609, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 6610, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 6611, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Joel Hernandez MD\" ) " }, { "id": 6612, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Lori Harrison\" order by transaction_date limit 1" }, { "id": 6613, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Gregory Good\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) )" }, { "id": 6614, "SQL": "select transaction_date 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 = \"Coal\" order by transaction_date asc limit 1 " }, { "id": 6615, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Julia Cowan\" ) " }, { "id": 6616, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 6617, "SQL": "select transaction_date 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 = \"Wells\" order by transaction_date asc limit 1 " }, { "id": 6618, "SQL": "select max(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 = \"David Rogers\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 6619, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"John Stein\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 6620, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Christian Stevens\" order by transaction_date limit 1" }, { "id": 6621, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Kimberly Delgado\" and transaction_type = 'invoice'" }, { "id": 6622, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brandon Walters\" ) " }, { "id": 6623, "SQL": "select min(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 = \"Julie Parker\" and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 6624, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 6625, "SQL": "select transaction_date 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 = \"Townhouses\" order by transaction_date asc limit 1 " }, { "id": 6626, "SQL": "select transaction_id from master_txn_table where product_service = \"Social\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 6627, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Michael Garrett\" ) " }, { "id": 6628, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Bank Charges\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 6629, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 6630, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 6631, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sarah Mann\" ) " }, { "id": 6632, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 6633, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 6634, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 6635, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Carrie Nelson\" ) " }, { "id": 6636, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Computer software and software application training\") 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') " }, { "id": 6637, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 6638, "SQL": "select transaction_date from master_txn_table where customers = \"Beth Matthews\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 6639, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Darrell Bell\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 6640, "SQL": "select max(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 = \"Janet Smith\" and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 6641, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") order by sum(debit) desc limit 1" }, { "id": 6642, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Artificial Intelligence Courses\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 6643, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Terri Hogan\" ) " }, { "id": 6644, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Joel Berry\" ) " }, { "id": 6645, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Tracy Hernandez\" order by transaction_date limit 1" }, { "id": 6646, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Shawn Hamilton\" ) " }, { "id": 6647, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Matthew Solis\" ) " }, { "id": 6648, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 6649, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Brian Pearson\"" }, { "id": 6650, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 6651, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Chad Martinez\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) )" }, { "id": 6652, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Kyle Flores\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 6653, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Douglas Gordon\" order by transaction_date limit 1" }, { "id": 6654, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Equipment Rental\") and vendor = \"Shannon Garcia\"" }, { "id": 6655, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 6656, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Shirley Mcmillan\" and transaction_type = 'payment' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') ) " }, { "id": 6657, "SQL": "select transaction_id from master_txn_table where product_service = \"Bicycle\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 6658, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 6659, "SQL": "select min(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 = \"Angela Ray\" and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 6660, "SQL": "select sum(credit) from master_txn_table where product_service = \"Bars and Nightclubs\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 6661, "SQL": "select min(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 = \"Nicholas Yang\" and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 6662, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jonathan Sanders\" ) " }, { "id": 6663, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Isaac Harris\" and transaction_type = 'invoice'" }, { "id": 6664, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 6665, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Sarah Flowers\" order by transaction_date limit 1" }, { "id": 6666, "SQL": "select min(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 = \"Gerald Bradshaw\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 6667, "SQL": "select transaction_date 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 = \"Financial Investment\" order by transaction_date asc limit 1 " }, { "id": 6668, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Manufacturing other Natural oils\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 6669, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Amber Macias\" ) " }, { "id": 6670, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 6671, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Autumn Brown\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 6672, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Dawn Cook\" ) " }, { "id": 6673, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Michael Diaz\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 6674, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jennifer Smith\" ) " }, { "id": 6675, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Aaron Martin DVM\" ) " }, { "id": 6676, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Chelsea Guzman\" order by transaction_date limit 1" }, { "id": 6677, "SQL": "select transaction_id from master_txn_table where product_service = \"Acetylene\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 6678, "SQL": "select transaction_id from master_txn_table where customers = \"David Park\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 6679, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Gabrielle Rowland\" order by transaction_date limit 1" }, { "id": 6680, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') and account_type in ('Expense','Other Expense') " }, { "id": 6681, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Joseph Hansen\" order by transaction_date limit 1" }, { "id": 6682, "SQL": "select min(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 = \"Billy Young\" and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 6683, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 6684, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Jessica Campos' or vendor = 'Jessica Campos'" }, { "id": 6685, "SQL": "select sum(credit) from master_txn_table where product_service = \"Diapers\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 6686, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jose Mills\" ) " }, { "id": 6687, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Pamela Shaw\" ) " }, { "id": 6688, "SQL": "select sum(credit) from master_txn_table where product_service = \"Party favors\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 6689, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 6690, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 6691, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Rhonda Cooper\" and transaction_type = 'invoice'" }, { "id": 6692, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Baby car seats\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 6693, "SQL": "select transaction_date from master_txn_table where customers = \"Jeremiah George\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 6694, "SQL": "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,\"Development of other voice and speech recognition products\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 6695, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Application service provisioning\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 6696, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Katie White\" ) " }, { "id": 6697, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Other nonfossil-fuel power generation\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 6698, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Data entry\" " }, { "id": 6699, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Susan Doyle\" ) " }, { "id": 6700, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 6701, "SQL": "select transaction_id from master_txn_table where customers = \"Meagan Munoz\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 6702, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Austin Gonzales\" ) " }, { "id": 6703, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"golf equipment rental services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 6704, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Debbie Dickerson' or vendor = 'Debbie Dickerson'" }, { "id": 6705, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Boat, ship and steamship rental or leasing\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 6706, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Patricia Lam\" order by transaction_date limit 1" }, { "id": 6707, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Dawn Rowe\" ) " }, { "id": 6708, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Zachary Huang\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 6709, "SQL": "select sum(credit) from master_txn_table where product_service = \"Dance\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 6710, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Daniel Morgan\" order by transaction_date limit 1" }, { "id": 6711, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Seth Rose\" ) " }, { "id": 6712, "SQL": "select sum(credit) from master_txn_table where product_service = \"Fluorocarbon gases\" and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 6713, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Angelica Sandoval\" ) " }, { "id": 6714, "SQL": "select sum(credit) from master_txn_table where product_service = \"Repair and Maintainenance\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 6715, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Car seats\" " }, { "id": 6716, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Alicia Lopez\" ) " }, { "id": 6717, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sharon Cortez\" ) " }, { "id": 6718, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Heavy construction equipment rental\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 6719, "SQL": "select transaction_date from master_txn_table where customers = \"Margaret Barnes\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 6720, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Edwin Hunter\" ) " }, { "id": 6721, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 6722, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by billing_city" }, { "id": 6723, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Charles Beard\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 6724, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Megan White\" ) " }, { "id": 6725, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Commissions & fees\") and vendor = \"Sarah Fitzgerald\"" }, { "id": 6726, "SQL": "select transaction_id from master_txn_table where product_service = \"Environmental impact assessment\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 6727, "SQL": "select max(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 = \"John Mills\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 6728, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Brian Clark PhD\" order by transaction_date limit 1" }, { "id": 6729, "SQL": "select transaction_date from master_txn_table where customers = \"Sheila Holden\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 6730, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Darren Thomas' or vendor = 'Darren Thomas'" }, { "id": 6731, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Gina Nichols\"" }, { "id": 6732, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 6733, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Jenna Jenkins' or vendor = 'Jenna Jenkins'" }, { "id": 6734, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 6735, "SQL": "select avg(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 = \"Eugene Simpson\" and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 6736, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Joel Richmond' or vendor = 'Joel Richmond'" }, { "id": 6737, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Roberto Glenn\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") )" }, { "id": 6738, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Gwendolyn Young\" ) " }, { "id": 6739, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Loan Payable\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 6740, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 6741, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 6742, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 6743, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 6744, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Diving equipment retailing\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 6745, "SQL": "select transaction_date from master_txn_table where customers = \"Robert Wiley\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 6746, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Alexandra Compton\" ) " }, { "id": 6747, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Lisa Little' or vendor = 'Lisa Little'" }, { "id": 6748, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 6749, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"William Holmes\" ) " }, { "id": 6750, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 6751, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'William Alvarez' or vendor = 'William Alvarez'" }, { "id": 6752, "SQL": "select transaction_date from master_txn_table where customers = \"Sonia Hoffman\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 6753, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 6754, "SQL": "select transaction_id from master_txn_table where customers = \"Allison Oneill\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 6755, "SQL": "select sum(credit) from master_txn_table where product_service = \"Swimming pool Cleaning\" and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 6756, "SQL": "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,\"Nursing and health services\") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 6757, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Amy Banks\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 6758, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Duane Sanders\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") ) " }, { "id": 6759, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 6760, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Laura Paul\" ) " }, { "id": 6761, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Sheila Sanders\"" }, { "id": 6762, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Rhonda Ellison' or vendor = 'Rhonda Ellison'" }, { "id": 6763, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 6764, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Tina Baker\" order by transaction_date limit 1" }, { "id": 6765, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 6766, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Joseph Hayes' or vendor = 'Joseph Hayes'" }, { "id": 6767, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 6768, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 6769, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Michelle Shah\" ) " }, { "id": 6770, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Jodi Thompson\" and transaction_type = 'payment' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') ) " }, { "id": 6771, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by billing_city" }, { "id": 6772, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Melissa Berry\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') )" }, { "id": 6773, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Melissa Young\" ) " }, { "id": 6774, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"John Graham\" ) " }, { "id": 6775, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 6776, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 6777, "SQL": "select transaction_date from master_txn_table where customers = \"Michelle Ochoa\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 6778, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jessica Weaver\" ) " }, { "id": 6779, "SQL": "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\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 6780, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Database management\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 6781, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jacob Diaz\" ) " }, { "id": 6782, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 6783, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Brenda Cobb\" order by transaction_date limit 1" }, { "id": 6784, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brandy Bowers\" ) " }, { "id": 6785, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 6786, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Lauren Floyd\" and transaction_type = 'invoice'" }, { "id": 6787, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Nicole Potter\" ) " }, { "id": 6788, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 6789, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"James Mason\" ) " }, { "id": 6790, "SQL": "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,\"Private mailbox rental services\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 6791, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 6792, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Samuel Bishop\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 6793, "SQL": "select sum(credit) from master_txn_table where product_service = \"Nursing and health\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 6794, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Holly Davis\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) ) " }, { "id": 6795, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 6796, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') order by sum(debit) desc limit 1" }, { "id": 6797, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Supplies\") and vendor = \"Scott Schneider\"" }, { "id": 6798, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Mary King\" and transaction_type = 'invoice'" }, { "id": 6799, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Alexander Ryan\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) )" }, { "id": 6800, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jordan Robinson\" and transaction_type = 'invoice'" }, { "id": 6801, "SQL": "select transaction_date from master_txn_table where customers = \"Julia Cox\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 6802, "SQL": "select transaction_id from master_txn_table where customers = \"Nichole Thomas\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 6803, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jasmine Rodriguez\" ) " }, { "id": 6804, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Katherine Mccann MD\"" }, { "id": 6805, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Troy Tran\" order by transaction_date limit 1" }, { "id": 6806, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 6807, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Wanda Quinn\" ) " }, { "id": 6808, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Office Expenses\") and vendor = \"Christopher Taylor\"" }, { "id": 6809, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Food & drink\") and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 6810, "SQL": "select sum(credit) from master_txn_table where product_service = \"Forestry Machinery\" and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 6811, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Data entry services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 6812, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 6813, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Brian Molina\" order by transaction_date limit 1" }, { "id": 6814, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Donna Mccormick\" ) " }, { "id": 6815, "SQL": "select min(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 = \"Michael Cunningham\" and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 6816, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Timothy Beck\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 6817, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Nursing and health services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 6818, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 6819, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Antonio Mcdonald\" ) " }, { "id": 6820, "SQL": "select transaction_date 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 = \"Dining\" order by transaction_date asc limit 1 " }, { "id": 6821, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Tyler Ruiz\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') )" }, { "id": 6822, "SQL": "select transaction_date from master_txn_table where customers = \"Chelsea Garcia\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 6823, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Emily Booker\" ) " }, { "id": 6824, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Data processing\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 6825, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Local area network management training\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 6826, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 6827, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Travis Mccormick\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 6828, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Claire Ruiz\" and transaction_type = 'invoice'" }, { "id": 6829, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Uncategorized Expense\") and vendor = \"Mark Nguyen\"" }, { "id": 6830, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 6831, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Kimberly Alvarado\" order by transaction_date limit 1" }, { "id": 6832, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Private parcel mailing services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 6833, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jason Ortiz\" ) " }, { "id": 6834, "SQL": "select transaction_date 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 = \"Youth\" order by transaction_date asc limit 1 " }, { "id": 6835, "SQL": "select sum(credit) from master_txn_table where product_service = \"Duct and gutter cleaning\" and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 6836, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Charles Prince\" ) " }, { "id": 6837, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 6838, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 6839, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 6840, "SQL": "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,\"Heavy construction equipment rental\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 6841, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 6842, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 6843, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Keith Mills\" order by transaction_date limit 1" }, { "id": 6844, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Eric Pena\" ) " }, { "id": 6845, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 6846, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 6847, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Nathaniel Myers\" ) " }, { "id": 6848, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Kayla Wright\" and transaction_type = 'invoice'" }, { "id": 6849, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 6850, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Bars and Nightclubs\" " }, { "id": 6851, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Home therapy services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 6852, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 6853, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Deborah Buckley' or vendor = 'Deborah Buckley'" }, { "id": 6854, "SQL": "select min(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 = \"Pamela Graham\" and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 6855, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Joel Kelly\" ) " }, { "id": 6856, "SQL": "select max(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 = \"Brittany Christensen\" and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 6857, "SQL": "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,\"Development of software products for PCs\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 6858, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lisa Norman\" ) " }, { "id": 6859, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Gregory Parsons\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') ) " }, { "id": 6860, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 6861, "SQL": "select transaction_date 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 = \"Equity long bias\" order by transaction_date asc limit 1 " }, { "id": 6862, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Shannon Garcia\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 6863, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 6864, "SQL": "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,\"Design and management services\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 6865, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Natural oils\" " }, { "id": 6866, "SQL": "select min(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 = \"Austin Thomas\" and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 6867, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 6868, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Christopher Chen\" ) " }, { "id": 6869, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 6870, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Gas and Electric\") and vendor = \"Kim Hernandez\"" }, { "id": 6871, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Daniel Mathis' or vendor = 'Daniel Mathis'" }, { "id": 6872, "SQL": "select transaction_date from master_txn_table where customers = \"Karen Nichols\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 6873, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 6874, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Valerie Bates\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) )" }, { "id": 6875, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Wendy Sanchez\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 6876, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Alexa Thompson\" ) " }, { "id": 6877, "SQL": "select transaction_date from master_txn_table where customers = \"Joseph Bender\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 6878, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Christopher Fleming\" order by transaction_date limit 1" }, { "id": 6879, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kristina Hawkins\" ) " }, { "id": 6880, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Ariel King\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 6881, "SQL": "select sum(credit) from master_txn_table where product_service = \"Trust and Fiduciary\" and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 6882, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 6883, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Development of software products for PCs\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 6884, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by billing_city" }, { "id": 6885, "SQL": "select transaction_id from master_txn_table where product_service = \"Teen outreach\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 6886, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Symphony performances\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 6887, "SQL": "select transaction_id from master_txn_table where product_service = \"Coordinators\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 6888, "SQL": "select max(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 = \"Jasmine Martinez\" and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 6889, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Jamie Schneider\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 6890, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 6891, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 6892, "SQL": "select product_service, 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 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') group by product_service order by sum(credit) desc limit 1" }, { "id": 6893, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Zachary Brown\" ) " }, { "id": 6894, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kenneth Myers\" ) " }, { "id": 6895, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') group by billing_city" }, { "id": 6896, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Todd Thomas\"" }, { "id": 6897, "SQL": "select transaction_id from master_txn_table where customers = \"Michael West\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 6898, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 6899, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Hunter Herrera\" order by transaction_date limit 1" }, { "id": 6900, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)group by product_service order by sum(credit) desc limit 1" }, { "id": 6901, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Angela Miranda\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) )" }, { "id": 6902, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Ethan Williams\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') )" }, { "id": 6903, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Vanessa Woodward\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 6904, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 6905, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jim Elliott\" order by transaction_date limit 1" }, { "id": 6906, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 6907, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') group by billing_city" }, { "id": 6908, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Stationery & Printing\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 6909, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"David Ford\" ) " }, { "id": 6910, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Securities\" " }, { "id": 6911, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Amber Summers\" and transaction_type = 'invoice'" }, { "id": 6912, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"James Thompson\"" }, { "id": 6913, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Robert Hicks\" order by transaction_date limit 1" }, { "id": 6914, "SQL": "select avg(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 = \"Rick Meyer\" and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 6915, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by billing_city" }, { "id": 6916, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Victoria Perry\" ) " }, { "id": 6917, "SQL": "select min(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 = \"Leslie Gaines\" and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 6918, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 6919, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Tyler Newton\"" }, { "id": 6920, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Matthew Weber\" ) " }, { "id": 6921, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Jesus Griffin\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) ) " }, { "id": 6922, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Wendy Simmons' or vendor = 'Wendy Simmons'" }, { "id": 6923, "SQL": "select transaction_id from master_txn_table where customers = \"Javier Charles\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 6924, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") and account_type in ('Expense','Other Expense') " }, { "id": 6925, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Susan Mooney\"" }, { "id": 6926, "SQL": "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,\"Coal Power generation\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 6927, "SQL": "select sum(credit) from master_txn_table where product_service = \"Sofas/sofa-sleepers\" and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 6928, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Joseph Riley\" and transaction_type = 'invoice'" }, { "id": 6929, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Robin Ford\" ) " }, { "id": 6930, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"David Smith\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 6931, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Joseph Rocha\" ) " }, { "id": 6932, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 6933, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Joseph James\" ) " }, { "id": 6934, "SQL": "select transaction_date from master_txn_table where customers = \"Kristen Allen\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 6935, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') group by billing_city" }, { "id": 6936, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Registration for tournaments and matches\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 6937, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') group by billing_city" }, { "id": 6938, "SQL": "select transaction_date 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 = \"Non-renewable\" order by transaction_date asc limit 1 " }, { "id": 6939, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Maintenance and Repair\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 6940, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Monica Hanson\" ) " }, { "id": 6941, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Russell Burton\"" }, { "id": 6942, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 6943, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 6944, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Unapplied Cash Bill Payment Expense\") and vendor = \"Patrick Lewis\"" }, { "id": 6945, "SQL": "select transaction_date 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 = \"Motorbike\" order by transaction_date asc limit 1 " }, { "id": 6946, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Barbara Smith\"" }, { "id": 6947, "SQL": "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,\"Development of other voice and speech recognition products\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 6948, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 6949, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Yvette Martinez\" and transaction_type = 'invoice'" }, { "id": 6950, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jonathan Bolton\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 6951, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Care-planning services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 6952, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Shane Garcia\" ) " }, { "id": 6953, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 6954, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 6955, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 6956, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Bryan Reed\" ) " }, { "id": 6957, "SQL": "select transaction_date 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 = \"Carbon dioxide\" order by transaction_date asc limit 1 " }, { "id": 6958, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 6959, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Susan Jones\" ) " }, { "id": 6960, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 6961, "SQL": "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 = \"Judy Adams\" and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 6962, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 6963, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Telephone\") and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 6964, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Sally Brown\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') )" }, { "id": 6965, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Retailing master bedroom furniture\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 6966, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Madison Martinez\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 6967, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 6968, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 6969, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 6970, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Blake Lara\" and transaction_type = 'invoice'" }, { "id": 6971, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 6972, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Evan Long\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 6973, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 6974, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jacob Griffith\" ) " }, { "id": 6975, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 6976, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Abigail Potts\" ) " }, { "id": 6977, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Kristen Duncan\"" }, { "id": 6978, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Nicholas Carr\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 6979, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 6980, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Kathy Long\" order by transaction_date limit 1" }, { "id": 6981, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Denise Gonzalez\" ) " }, { "id": 6982, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Mary Simpson\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 6983, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Samantha Booker\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 6984, "SQL": "select transaction_id from master_txn_table where customers = \"Ryan Gutierrez\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 6985, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 6986, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Nancy Dillon\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 6987, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Erica Miller\" order by transaction_date limit 1" }, { "id": 6988, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 6989, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 6990, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by billing_city" }, { "id": 6991, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Julia Contreras\"" }, { "id": 6992, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Melanie Norman\"" }, { "id": 6993, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and 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') " }, { "id": 6994, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 6995, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 6996, "SQL": "select transaction_id from master_txn_table where product_service = \"Party favors\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 6997, "SQL": "select transaction_id from master_txn_table where product_service = \"Railroad terminals\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 6998, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Richard Alexander\" and transaction_type = 'payment' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') ) " }, { "id": 6999, "SQL": "select sum(credit) from master_txn_table where product_service = \"Motorbike\" and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 7000, "SQL": "select max(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 = \"Daniel Jackson\" and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 7001, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Flowers\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 7002, "SQL": "select max(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 = \"Theresa Stevenson\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 7003, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") order by sum(debit) desc limit 1" }, { "id": 7004, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 7005, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Providing financing related to securities\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 7006, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Steve Mendez\" ) " }, { "id": 7007, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Shannon Franklin\" ) " }, { "id": 7008, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jessica Robinson\" ) " }, { "id": 7009, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Swimming pool Cleaning\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 7010, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Sheila Williams' or vendor = 'Sheila Williams'" }, { "id": 7011, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Michael Curtis\" ) " }, { "id": 7012, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Bank Charges\") and vendor = \"Danielle Caldwell\"" }, { "id": 7013, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 7014, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Matthew Floyd\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 7015, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Motorbike \") and 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') " }, { "id": 7016, "SQL": "select max(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 = \"Anthony Morris\" and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 7017, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Randy Sanders' or vendor = 'Randy Sanders'" }, { "id": 7018, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jeffrey Santiago\" order by transaction_date limit 1" }, { "id": 7019, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 7020, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Richard Carey\" ) " }, { "id": 7021, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Michael Reid\" ) " }, { "id": 7022, "SQL": "select transaction_date from master_txn_table where customers = \"David Espinoza\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 7023, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 7024, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 7025, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Chelsea Robinson\" ) " }, { "id": 7026, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jared Richardson\" ) " }, { "id": 7027, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Taylor Jackson\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 7028, "SQL": "select transaction_id from master_txn_table where customers = \"Patrick Moreno\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 7029, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brenda Schwartz\" ) " }, { "id": 7030, "SQL": "select transaction_id from master_txn_table where product_service = \"Financial Investment\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 7031, "SQL": "select sum(credit) from master_txn_table where product_service = \"Senior-care\" and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 7032, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 7033, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 7034, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 7035, "SQL": "select transaction_date from master_txn_table where customers = \"Joanna Fuller\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 7036, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Nancy Vang\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 7037, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 7038, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"William Trevino\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 7039, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Renee Salazar\" ) " }, { "id": 7040, "SQL": "select sum(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Musical\" " }, { "id": 7041, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') and account_type in ('Expense','Other Expense') " }, { "id": 7042, "SQL": "select min(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 = \"Mary Garrett\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 7043, "SQL": "select transaction_id from master_txn_table where customers = \"Robin Walker\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 7044, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Donna York\"" }, { "id": 7045, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 7046, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Andrea Allison\"" }, { "id": 7047, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Meals and Entertainment\") and vendor = \"Brandon Rodriguez\"" }, { "id": 7048, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Bicycle retailing\") and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 7049, "SQL": "select transaction_date 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 = \"Flowers\" order by transaction_date asc limit 1 " }, { "id": 7050, "SQL": "select max(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 = \"Edward Potter\" and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 7051, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Bradley Ross\" order by transaction_date limit 1" }, { "id": 7052, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Elizabeth Lawrence\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') )" }, { "id": 7053, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sherry Donovan\" ) " }, { "id": 7054, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Tiffany Jimenez MD\" ) " }, { "id": 7055, "SQL": "select transaction_date from master_txn_table where customers = \"Tina Day\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 7056, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Brandon Mcgrath\"" }, { "id": 7057, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Christine Christensen\" ) " }, { "id": 7058, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Jason Quinn\"" }, { "id": 7059, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Pamela Sherman\"" }, { "id": 7060, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 7061, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Michele Smith\" ) " }, { "id": 7062, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 7063, "SQL": "select transaction_date from master_txn_table where customers = \"Devin Morris\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 7064, "SQL": "select transaction_date from master_txn_table where customers = \"Pamela Dawson\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 7065, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Marie Maldonado\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') )" }, { "id": 7066, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Howard Barker' or vendor = 'Howard Barker'" }, { "id": 7067, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 7068, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') group by product_service order by sum(credit) desc limit 1" }, { "id": 7069, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Labor\") and 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') " }, { "id": 7070, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Scott West\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 7071, "SQL": "select transaction_id from master_txn_table where product_service = \"Swimming pool Cleaning\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 7072, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Development of software products for automobiles\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 7073, "SQL": "select transaction_date 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 = \"Software Training\" order by transaction_date asc limit 1 " }, { "id": 7074, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Charles Perry\" ) " }, { "id": 7075, "SQL": "select transaction_id from master_txn_table where customers = \"Katelyn Holland\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 7076, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Sara King\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 7077, "SQL": "select transaction_id from master_txn_table where product_service = \"Spraying\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 7078, "SQL": "select sum(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Games\" " }, { "id": 7079, "SQL": "select transaction_id from master_txn_table where customers = \"Wendy Costa MD\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 7080, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jason Farmer\" ) " }, { "id": 7081, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Jennifer Hogan' or vendor = 'Jennifer Hogan'" }, { "id": 7082, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Eric Daniels\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) ) " }, { "id": 7083, "SQL": "select max(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 = \"Jennifer Hamilton\" and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 7084, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Chelsea Kemp\" and transaction_type = 'payment' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') ) " }, { "id": 7085, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Ronald Williams MD\" order by transaction_date limit 1" }, { "id": 7086, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 7087, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Automobile\") and vendor = \"William Cook\"" }, { "id": 7088, "SQL": "select transaction_id from master_txn_table where customers = \"Janet Watson\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 7089, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Spearmint oil\" " }, { "id": 7090, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 7091, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Alan Morrow\" and transaction_type = 'invoice'" }, { "id": 7092, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Frances King\"" }, { "id": 7093, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Anita Lee\"" }, { "id": 7094, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 7095, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Joseph Duncan\" and account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 7096, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 7097, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Peter Lara' or vendor = 'Peter Lara'" }, { "id": 7098, "SQL": "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,\"Unapplied Cash Bill Payment Expense\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 7099, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 7100, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 7101, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Lindsey Porter\" and transaction_type = 'payment' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') ) " }, { "id": 7102, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Hannah Walker\" and transaction_type = 'payment' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') )" }, { "id": 7103, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 7104, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 7105, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Miguel Allen\" ) " }, { "id": 7106, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"William Price\" ) " }, { "id": 7107, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 7108, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Audrey Green\"" }, { "id": 7109, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Hotels and motel services\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 7110, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Willie Hudson\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 7111, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Lindsay Juarez\"" }, { "id": 7112, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Thomas Richardson\" ) " }, { "id": 7113, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Nathan Barnett\" order by transaction_date limit 1" }, { "id": 7114, "SQL": "select transaction_date from master_txn_table where customers = \"Julie Harris\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 7115, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Bowling equipment and supply retailing\") and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 7116, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 7117, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 7118, "SQL": "select transaction_date 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 = \"Inorganic Gases\" order by transaction_date asc limit 1 " }, { "id": 7119, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Isabella Nguyen\" ) " }, { "id": 7120, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') order by sum(debit) desc limit 1" }, { "id": 7121, "SQL": "select transaction_id from master_txn_table where product_service = \"Helium\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 7122, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 7123, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 7124, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 7125, "SQL": "select avg(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 = \"Monique Taylor\" and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 7126, "SQL": "select transaction_date from master_txn_table where customers = \"Samuel Jimenez\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 7127, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Scott Middleton\" ) " }, { "id": 7128, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Lindsey Winters\" and transaction_type = 'invoice'" }, { "id": 7129, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Heather Russell' or vendor = 'Heather Russell'" }, { "id": 7130, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Nicholas Thompson\" ) " }, { "id": 7131, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Raymond Cox\"" }, { "id": 7132, "SQL": "select transaction_id from master_txn_table where product_service = \"Fishing\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 7133, "SQL": "select product_service, 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 transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') group by product_service order by sum(credit) desc limit 1" }, { "id": 7134, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Providing railroad switching services\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 7135, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Shearing services\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 7136, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Jeffery Caldwell\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 7137, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 7138, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Other renewable-fueled power generation\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 7139, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Andrew Barber\"" }, { "id": 7140, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jeffrey Brandt\" ) " }, { "id": 7141, "SQL": "select transaction_id from master_txn_table where product_service = \"Industrial manufacturing\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 7142, "SQL": "select transaction_date 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 = \"Quality assessment\" order by transaction_date asc limit 1 " }, { "id": 7143, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Repair & Maintenance (deleted)\") and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 7144, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 7145, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Construction management services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 7146, "SQL": "select transaction_date 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 = \"Meals\" order by transaction_date asc limit 1 " }, { "id": 7147, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Unapplied Cash Bill Payment Expense\") and vendor = \"Kelsey Mcdaniel\"" }, { "id": 7148, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Travel\") and vendor = \"Catherine Thomas\"" }, { "id": 7149, "SQL": "select avg(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 = \"Kelly Lynch\" and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 7150, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Private mailbox rental services\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 7151, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Megan Park\"" }, { "id": 7152, "SQL": "select transaction_date 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 = \"Casings, Tubes and Rods\" order by transaction_date asc limit 1 " }, { "id": 7153, "SQL": "select transaction_date from master_txn_table where customers = \"Phillip Bowman\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 7154, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Mary Carter\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date) AND date(current_date) )" }, { "id": 7155, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and 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') group by billing_city" }, { "id": 7156, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Roy Conley\" ) " }, { "id": 7157, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 7158, "SQL": "select transaction_date 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 = \"Data storage management\" order by transaction_date asc limit 1 " }, { "id": 7159, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Larry Rodgers\" ) " }, { "id": 7160, "SQL": "select transaction_id from master_txn_table where product_service = \"Loading and unloading\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 7161, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"golf equipment rental services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 7162, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 7163, "SQL": "select transaction_id from master_txn_table where customers = \"Brittany Fletcher\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 7164, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Justin Prince\" order by transaction_date limit 1" }, { "id": 7165, "SQL": "select transaction_id from master_txn_table where product_service = \"Nursing and health\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 7166, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Peter Harper\" ) " }, { "id": 7167, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Garrett James\" ) " }, { "id": 7168, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Michael Robertson\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") )" }, { "id": 7169, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 7170, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Insurance\") and vendor = \"Patrick Dixon\"" }, { "id": 7171, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Providing dealing services\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 7172, "SQL": "select min(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 = \"Kenneth Espinoza\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 7173, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 7174, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Kenneth Robinson\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 7175, "SQL": "select max(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 = \"Nicholas West\" and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 7176, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Catherine Orozco\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 7177, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Sheena Mathis\" order by transaction_date limit 1" }, { "id": 7178, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") group by product_service order by sum(credit) desc limit 1" }, { "id": 7179, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Christopher Clark\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 7180, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Richard Roy\" ) " }, { "id": 7181, "SQL": "select transaction_id from master_txn_table where customers = \"Lauren Scott\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 7182, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Troy Schwartz\"" }, { "id": 7183, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Samantha Gardner\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 7184, "SQL": "select max(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 = \"Timothy Arnold\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 7185, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Chloe Cole\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) ) " }, { "id": 7186, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Donna Parker\" ) " }, { "id": 7187, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Charlotte Stewart\" order by transaction_date limit 1" }, { "id": 7188, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Scott Moreno\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 7189, "SQL": "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,\"Street vending locations\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 7190, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Alexis Reed\" ) " }, { "id": 7191, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Retailing Wardrobe\") and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 7192, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brittany Kelley\" ) " }, { "id": 7193, "SQL": "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,\"Basic office and secretarial skills training\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 7194, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Workers Compensation\") and vendor = \"Adam Adams\"" }, { "id": 7195, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 7196, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"John Hughes\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 7197, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Erin Wilson\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 7198, "SQL": "select transaction_date 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 = \"Fishing\" order by transaction_date asc limit 1 " }, { "id": 7199, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Lindsey Hughes\" order by transaction_date limit 1" }, { "id": 7200, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 7201, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Christopher Maldonado\"" }, { "id": 7202, "SQL": "select transaction_date 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 = \"Strollers\" order by transaction_date asc limit 1 " }, { "id": 7203, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lance Haley\" ) " }, { "id": 7204, "SQL": "select transaction_date 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 = \"Mining machinery\" order by transaction_date asc limit 1 " }, { "id": 7205, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Jasmine Griffin\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 7206, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Furniture\" " }, { "id": 7207, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brittany Brown\" ) " }, { "id": 7208, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Antonio Brown\" order by transaction_date limit 1" }, { "id": 7209, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Rebecca Bond\" ) " }, { "id": 7210, "SQL": "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,\"Insurance\") and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 7211, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 7212, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Rachel Zuniga\"" }, { "id": 7213, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Latoya Brown\"" }, { "id": 7214, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Stephen Morris\" order by transaction_date limit 1" }, { "id": 7215, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Melinda Hawkins\" ) " }, { "id": 7216, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Laura Allison\" ) " }, { "id": 7217, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Richard Gibson\" ) " }, { "id": 7218, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Katherine Fuller\" ) " }, { "id": 7219, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Sarah Flowers' or vendor = 'Sarah Flowers'" }, { "id": 7220, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 7221, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Darren Lopez\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) )" }, { "id": 7222, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 7223, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Ashley Mays' or vendor = 'Ashley Mays'" }, { "id": 7224, "SQL": "select transaction_date 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 = \"Gifts and grants\" order by transaction_date asc limit 1 " }, { "id": 7225, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 7226, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 7227, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 7228, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 7229, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Kim Miles\" and transaction_type = 'payment' 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') ) " }, { "id": 7230, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 7231, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'David Hess' or vendor = 'David Hess'" }, { "id": 7232, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Robert Phillips\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') )" }, { "id": 7233, "SQL": "select sum(credit) from master_txn_table where product_service = \"Eucalyptus oil\" and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 7234, "SQL": "select sum(credit) from master_txn_table where product_service = \"Therapy\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 7235, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jeremiah George\" and transaction_type = 'invoice'" }, { "id": 7236, "SQL": "select transaction_id from master_txn_table where customers = \"Timothy Turner\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 7237, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Dana Phillips\" ) " }, { "id": 7238, "SQL": "select transaction_id from master_txn_table where customers = \"Nicholas May\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 7239, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) group by billing_city" }, { "id": 7240, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Colleen Skinner\"" }, { "id": 7241, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Steven Flores\" ) " }, { "id": 7242, "SQL": "select transaction_date from master_txn_table where customers = \"Melanie Mahoney\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 7243, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 7244, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Derrick Phillips\" ) " }, { "id": 7245, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Katelyn Wilkerson\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) ) " }, { "id": 7246, "SQL": "select transaction_date 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 = \"Fluorocarbon gases\" order by transaction_date asc limit 1 " }, { "id": 7247, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Shannon Walker\" and transaction_type = 'payment' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') )" }, { "id": 7248, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 7249, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Angela Huff\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 7250, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 7251, "SQL": "select transaction_date from master_txn_table where customers = \"Shannon Conner\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 7252, "SQL": "select transaction_id from master_txn_table where product_service = \"Service Provider\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 7253, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Matthew Price\" ) " }, { "id": 7254, "SQL": "select transaction_date 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 = \"Fishing\" order by transaction_date asc limit 1 " }, { "id": 7255, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Robert Hansen\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 7256, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Terry Green DVM\" order by transaction_date limit 1" }, { "id": 7257, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 7258, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 7259, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Annette Ryan\" ) " }, { "id": 7260, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Thomas Nguyen MD\" order by transaction_date limit 1" }, { "id": 7261, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Devin Mann' or vendor = 'Devin Mann'" }, { "id": 7262, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Olivia Brown\"" }, { "id": 7263, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 7264, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 7265, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Dustin Patterson\"" }, { "id": 7266, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Theodore Powell\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 7267, "SQL": "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,\"Constructing multifamily residential\") and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 7268, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jared Mills\"" }, { "id": 7269, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Chad Webster\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') )" }, { "id": 7270, "SQL": "select sum(credit) from master_txn_table where product_service = \"Street vendoring\" 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') " }, { "id": 7271, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Andrea Burke\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 7272, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Karen Glass\" ) " }, { "id": 7273, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jason Baker\" ) " }, { "id": 7274, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Ashley Powell\" and account_type in ('Expense','Other Expense') and 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') " }, { "id": 7275, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Michele Potts\" ) " }, { "id": 7276, "SQL": "select transaction_date 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 = \"Hydroelectric electricity\" order by transaction_date asc limit 1 " }, { "id": 7277, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 7278, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Amanda Rowe\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') ) " }, { "id": 7279, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 7280, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Henry Harris\" ) " }, { "id": 7281, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 7282, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 7283, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Clifford Carter\" ) " }, { "id": 7284, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ashley Richmond\" ) " }, { "id": 7285, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 7286, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") and account_type in ('Expense','Other Expense') " }, { "id": 7287, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Nicholas Gross\"" }, { "id": 7288, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Travel Meals\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 7289, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Hydrogen manufacturing\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 7290, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Laura Morgan\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 7291, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Jill Stout\" and account_type in ('Expense','Other Expense') 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') " }, { "id": 7292, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Carol Garrett\" ) " }, { "id": 7293, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Charles Medina\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') )" }, { "id": 7294, "SQL": "select transaction_id from master_txn_table where customers = \"Jennifer Burke\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 7295, "SQL": "select transaction_id from master_txn_table where customers = \"Crystal Lane\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 7296, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Alexandria Obrien\" order by transaction_date limit 1" }, { "id": 7297, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Office Expenses\") and 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') " }, { "id": 7298, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Donna Banks\" order by transaction_date limit 1" }, { "id": 7299, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Sean Robinson' or vendor = 'Sean Robinson'" }, { "id": 7300, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Arthur Marks\" ) " }, { "id": 7301, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 7302, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sierra Kaufman\" ) " }, { "id": 7303, "SQL": "select transaction_date 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 = \"Care-planning\" order by transaction_date asc limit 1 " }, { "id": 7304, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Emily Berger\" ) " }, { "id": 7305, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Scott Farmer\" and account_type in ('Expense','Other Expense') and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 7306, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 7307, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' 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') " }, { "id": 7308, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 7309, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Marilyn Garner\" order by transaction_date limit 1" }, { "id": 7310, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Autumn Patel\" and transaction_type = 'invoice'" }, { "id": 7311, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"James Walton\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 7312, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Angelica Baker\" order by transaction_date limit 1" }, { "id": 7313, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Grapefruit oil\" " }, { "id": 7314, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Omar Robinson\"" }, { "id": 7315, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Lisa Freeman\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 7316, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"food and beverage services\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 7317, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Timothy Hickman' or vendor = 'Timothy Hickman'" }, { "id": 7318, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Advertising\") and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 7319, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jack Wallace\" ) " }, { "id": 7320, "SQL": "select transaction_id from master_txn_table where product_service = \"Coal Pwer\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 7321, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 7322, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 7323, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Robert Miller\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 7324, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Billy Johnson\" and transaction_type = 'invoice'" }, { "id": 7325, "SQL": "select transaction_date from master_txn_table where customers = \"Lisa Mccullough\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 7326, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Robert Robbins' or vendor = 'Robert Robbins'" }, { "id": 7327, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 7328, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Appearances and speeches\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 7329, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Katherine Sims' or vendor = 'Katherine Sims'" }, { "id": 7330, "SQL": "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,\"Private parcel mailing centers\") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 7331, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 7332, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Daniel Tyler\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) ) " }, { "id": 7333, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Ventilation cleaning\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 7334, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Database management\" " }, { "id": 7335, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Tina White\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) ) " }, { "id": 7336, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Kevin Koch\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 7337, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Mary Aguilar\" ) " }, { "id": 7338, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Billy Roberts MD\"" }, { "id": 7339, "SQL": "select transaction_date 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 = \"Flowers\" order by transaction_date asc limit 1 " }, { "id": 7340, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') group by billing_city" }, { "id": 7341, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Charles Walker\" ) " }, { "id": 7342, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 7343, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"John Vargas\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 7344, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Marcus Walker\" ) " }, { "id": 7345, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 7346, "SQL": "select transaction_date from master_txn_table where customers = \"Alexander Hooper\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 7347, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Carlos Soto\" ) " }, { "id": 7348, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 7349, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) group by billing_city" }, { "id": 7350, "SQL": "select transaction_date 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 = \"Equity long/short\" order by transaction_date asc limit 1 " }, { "id": 7351, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 7352, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Ashley Olson\"" }, { "id": 7353, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Cynthia Bolton\" ) " }, { "id": 7354, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Andrew Phelps\" ) " }, { "id": 7355, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Elizabeth Golden\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 7356, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Cheryl Hickman\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 7357, "SQL": "select max(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 = \"Troy Hill\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 7358, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Promotional\") and vendor = \"Patrick Jones\"" }, { "id": 7359, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Chad Carrillo\" ) " }, { "id": 7360, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 7361, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 7362, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Automobile\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 7363, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 7364, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Sharon Morris\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 7365, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Scott Clark\" ) " }, { "id": 7366, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 7367, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Boat\" " }, { "id": 7368, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 7369, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Renee Ford\" ) " }, { "id": 7370, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jeffrey Taylor\" ) " }, { "id": 7371, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"John Davis\" ) " }, { "id": 7372, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Web hosting\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 7373, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Counseling\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 7374, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Casey Parker\"" }, { "id": 7375, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Destiny Dalton\"" }, { "id": 7376, "SQL": "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,\"Insurance\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 7377, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Unapplied Cash Payment Income\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 7378, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Self-help programs\" " }, { "id": 7379, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Randy Torres\"" }, { "id": 7380, "SQL": "select transaction_id from master_txn_table where product_service = \"Appearances and speeches\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 7381, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Phillip Mcdowell\" ) " }, { "id": 7382, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 7383, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Nicole Price\"" }, { "id": 7384, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Madison Martinez\"" }, { "id": 7385, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Nathan Stafford\"" }, { "id": 7386, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 7387, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Justin White\" ) " }, { "id": 7388, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Recognition software for government and legal purposes\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 7389, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Duct and gutter cleaning\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 7390, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jeffrey Vargas\" ) " }, { "id": 7391, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Development of software products for Tablets\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 7392, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Michelle Dominguez\"" }, { "id": 7393, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jacob Lucas PhD\" order by transaction_date limit 1" }, { "id": 7394, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 7395, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Samantha Kim\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') ) " }, { "id": 7396, "SQL": "select transaction_id from master_txn_table where product_service = \"Sleepers\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 7397, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"James Day\" ) " }, { "id": 7398, "SQL": "select transaction_date 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 = \"Appearances and speeches\" order by transaction_date asc limit 1 " }, { "id": 7399, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Brenda Russell\" and transaction_type = 'payment' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') )" }, { "id": 7400, "SQL": "select transaction_date from master_txn_table where customers = \"Briana King\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 7401, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 7402, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Brad Bryant\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 7403, "SQL": "select transaction_id from master_txn_table where product_service = \"Medication\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 7404, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Sandra Guerra\" order by transaction_date limit 1" }, { "id": 7405, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Manufacturing eucalyptus oil\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 7406, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Melissa Cordova\" ) " }, { "id": 7407, "SQL": "select sum(credit) from master_txn_table where product_service = \"Club \" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 7408, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 7409, "SQL": "select transaction_date 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 = \"Aircraft Engines\" order by transaction_date asc limit 1 " }, { "id": 7410, "SQL": "select transaction_date from master_txn_table where customers = \"Robin Thomas\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 7411, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Financial Investment\" " }, { "id": 7412, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 7413, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Lawrence Brown' or vendor = 'Lawrence Brown'" }, { "id": 7414, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 7415, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Dawn Barnes\" ) " }, { "id": 7416, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Rachel Holmes\" ) " }, { "id": 7417, "SQL": "select transaction_date 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 = \"Copying\" order by transaction_date asc limit 1 " }, { "id": 7418, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jamie Lowery\" ) " }, { "id": 7419, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Adrian Hodge\" ) " }, { "id": 7420, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Carbon dioxide manufacturing\") and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 7421, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Philip Davis\"" }, { "id": 7422, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 7423, "SQL": "select transaction_date from master_txn_table where customers = \"Alan Wilson\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 7424, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Jamie Newman\"" }, { "id": 7425, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Garrett Marquez\" ) " }, { "id": 7426, "SQL": "select avg(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 = \"Kayla Malone\" and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 7427, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Amy Munoz\" ) " }, { "id": 7428, "SQL": "select transaction_date from master_txn_table where customers = \"Benjamin Martinez\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 7429, "SQL": "select min(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 = \"Sara French MD\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 7430, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Elizabeth Martinez\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 7431, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Tina Zamora\" order by transaction_date limit 1" }, { "id": 7432, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 7433, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Don Hickman\" ) " }, { "id": 7434, "SQL": "select transaction_date 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 = \"Casino Hotels\" order by transaction_date asc limit 1 " }, { "id": 7435, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') group by billing_city" }, { "id": 7436, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 7437, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Street vendoring\" " }, { "id": 7438, "SQL": "select sum(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Financial Investment\" " }, { "id": 7439, "SQL": "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,\"Nursing and health services\") and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 7440, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Cory Moses\" ) " }, { "id": 7441, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kayla Dixon\" ) " }, { "id": 7442, "SQL": "select transaction_id from master_txn_table where customers = \"William Peters\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 7443, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Dennis Jimenez\"" }, { "id": 7444, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Baby clothing and footwear\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 7445, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Matthew Rogers\" ) " }, { "id": 7446, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Erica Baker\" ) " }, { "id": 7447, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Providing courses through business schools\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 7448, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Penny Thompson\" ) " }, { "id": 7449, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"James Garcia\" ) " }, { "id": 7450, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 7451, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Scott Wright' or vendor = 'Scott Wright'" }, { "id": 7452, "SQL": "select transaction_date from master_txn_table where customers = \"Kristine Cook\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 7453, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Alexander Hunt\"" }, { "id": 7454, "SQL": "select transaction_id from master_txn_table where product_service = \"Saddlery\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 7455, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Bradley Conrad DDS\" order by transaction_date limit 1" }, { "id": 7456, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 7457, "SQL": "select max(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 = \"Kristin Henson\" and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 7458, "SQL": "select sum(credit) from master_txn_table where product_service = \"Games\" and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 7459, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Private mailbox rental services\") and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 7460, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 7461, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 7462, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 7463, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Livestock health services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 7464, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lisa Hayes\" ) " }, { "id": 7465, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Robert Mendez\" ) " }, { "id": 7466, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Alexander Lowe\" ) " }, { "id": 7467, "SQL": "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,\"Saddlery retailing\") 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') " }, { "id": 7468, "SQL": "select transaction_date 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 = \"Geothermal\" order by transaction_date asc limit 1 " }, { "id": 7469, "SQL": "select max(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 = \"Tony Williams\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 7470, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Donald Hendricks\" ) " }, { "id": 7471, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 7472, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Apparel and shoes\" " }, { "id": 7473, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') group by billing_city" }, { "id": 7474, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sheryl Wilson\" ) " }, { "id": 7475, "SQL": "select transaction_date from master_txn_table where customers = \"Lauren Rodriguez\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 7476, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Cementing wells\") and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 7477, "SQL": "select transaction_id from master_txn_table where product_service = \"Well casings\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 7478, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Nicole Barajas\" ) " }, { "id": 7479, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Caleb Freeman\" and transaction_type = 'invoice'" }, { "id": 7480, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 7481, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Adam Hansen\" ) " }, { "id": 7482, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Kathryn Arnold\"" }, { "id": 7483, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Christine Lucas\" order by transaction_date limit 1" }, { "id": 7484, "SQL": "select transaction_id from master_txn_table where product_service = \"Drinking and Special Food\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 7485, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 7486, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brittany Krause\" ) " }, { "id": 7487, "SQL": "select avg(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 = \"Levi Tran\" and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 7488, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Douglas Zavala\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) ) " }, { "id": 7489, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 7490, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Tammy Hanson\"" }, { "id": 7491, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') group by billing_city" }, { "id": 7492, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jessica Robertson\" ) " }, { "id": 7493, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Lisa Kelly\"" }, { "id": 7494, "SQL": "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,\"Boat, ship and steamship rental or leasing\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 7495, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 7496, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"James Whitney\" ) " }, { "id": 7497, "SQL": "select transaction_id from master_txn_table where product_service = \"Business courses\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 7498, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 7499, "SQL": "select transaction_date from master_txn_table where customers = \"Sheila Martin\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 7500, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Snow removal services\") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 7501, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Transportation services\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 7502, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') group by billing_city" }, { "id": 7503, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Duane Mcmahon\" and transaction_type = 'invoice'" }, { "id": 7504, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Laura Salazar\"" }, { "id": 7505, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Colleen Mcclain\"" }, { "id": 7506, "SQL": "select transaction_date 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 = \"Towboat\" order by transaction_date asc limit 1 " }, { "id": 7507, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Providing freight car cleaning services\") and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 7508, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Margaret Terrell\"" }, { "id": 7509, "SQL": "select transaction_id from master_txn_table where customers = \"Lori Ellis\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 7510, "SQL": "select transaction_id from master_txn_table where product_service = \"Shipping\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 7511, "SQL": "select transaction_id from master_txn_table where customers = \"Kathleen Higgins\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 7512, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Gene Ford\" ) " }, { "id": 7513, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Sandra Davenport\"" }, { "id": 7514, "SQL": "select transaction_id from master_txn_table where customers = \"Heidi Ortiz\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 7515, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Alexander Chase\" order by transaction_date limit 1" }, { "id": 7516, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Dairy\" " }, { "id": 7517, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kevin Wong\" ) " }, { "id": 7518, "SQL": "select avg(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 = \"Tiffany Nolan\" and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 7519, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Robert Martinez\" ) " }, { "id": 7520, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Julia Woods\" ) " }, { "id": 7521, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 7522, "SQL": "select transaction_id from master_txn_table where customers = \"Christopher Barber\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 7523, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 7524, "SQL": "select transaction_date 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 = \"Daily living assistance\" order by transaction_date asc limit 1 " }, { "id": 7525, "SQL": "select max(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 = \"Sarah Mack\" and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 7526, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Livestock health services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 7527, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Job Materials\") and vendor = \"Timothy Powell\"" }, { "id": 7528, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Computer Repair and Maintainenance\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 7529, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Other food services\") and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 7530, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Wendy Costa MD\" order by transaction_date limit 1" }, { "id": 7531, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 7532, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Grace Norton\" ) " }, { "id": 7533, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Monica Morris\" ) " }, { "id": 7534, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 7535, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"John Mcdonald\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") ) " }, { "id": 7536, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 7537, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Thomas Chambers\"" }, { "id": 7538, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 7539, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Melvin Huang\" ) " }, { "id": 7540, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Lisa Morris\"" }, { "id": 7541, "SQL": "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,\"Discounts given\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 7542, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Todd Aguilar\" ) " }, { "id": 7543, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Insurance\") and vendor = \"Matthew Serrano\"" }, { "id": 7544, "SQL": "select transaction_date 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 = \"high-rise and low-rise buildings\" order by transaction_date asc limit 1 " }, { "id": 7545, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 7546, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Brian Barber\" and account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 7547, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jessica Shaw\" ) " }, { "id": 7548, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Shaun Garcia' or vendor = 'Shaun Garcia'" }, { "id": 7549, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Taylor Quinn\" ) " }, { "id": 7550, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Alexander Rogers\" ) " }, { "id": 7551, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 7552, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Michael Miller\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 7553, "SQL": "select max(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 = \"Barbara Stone\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 7554, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Amy Johnson DDS\" ) " }, { "id": 7555, "SQL": "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,\"Adoption placement services\") and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 7556, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kimberly Schaefer\" ) " }, { "id": 7557, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jason Crawford\" ) " }, { "id": 7558, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Tyler Arnold\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 7559, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Popular music shows\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 7560, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Dana Austin\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') )" }, { "id": 7561, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lauren Erickson\" ) " }, { "id": 7562, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Shawn Duncan\" ) " }, { "id": 7563, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Kyle Miller\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 7564, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Rachel Jordan\" ) " }, { "id": 7565, "SQL": "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,\"Baby toys\") and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 7566, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Joshua Long\" ) " }, { "id": 7567, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jordan Paul\" ) " }, { "id": 7568, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and 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') " }, { "id": 7569, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Stephen Long\" ) " }, { "id": 7570, "SQL": "select transaction_date 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 = \"Aircraft\" order by transaction_date asc limit 1 " }, { "id": 7571, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Karla Liu\" ) " }, { "id": 7572, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Gregory Ayala\" order by transaction_date limit 1" }, { "id": 7573, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Data processing computer services\") 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') " }, { "id": 7574, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Tara Marshall\" and transaction_type = 'invoice'" }, { "id": 7575, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") group by product_service order by sum(credit) desc limit 1" }, { "id": 7576, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Appearances and speeches\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 7577, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Christopher Braun\" ) " }, { "id": 7578, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Fuel\") and vendor = \"Angela Bauer\"" }, { "id": 7579, "SQL": "select transaction_date from master_txn_table where customers = \"Sheila Spence\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 7580, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Alexis Scott\" and transaction_type = 'payment' and 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') ) " }, { "id": 7581, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Mark Powell\" order by transaction_date limit 1" }, { "id": 7582, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Olivia Roman\" and transaction_type = 'invoice'" }, { "id": 7583, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by billing_city" }, { "id": 7584, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Shelby Pierce\" ) " }, { "id": 7585, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by billing_city" }, { "id": 7586, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Michael Mendoza\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) ) " }, { "id": 7587, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Shunting trailers\" " }, { "id": 7588, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lisa Owens\" ) " }, { "id": 7589, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 7590, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Austin Wade\"" }, { "id": 7591, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Other renewable-fueled power generation\") and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 7592, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') group by billing_city" }, { "id": 7593, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Victoria Stanley\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 7594, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Mark Murphy\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 7595, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Becky Larsen\" order by transaction_date limit 1" }, { "id": 7596, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 7597, "SQL": "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 Income\") 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') " }, { "id": 7598, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"John Guerrero\" order by transaction_date limit 1" }, { "id": 7599, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Stephanie Powell\"" }, { "id": 7600, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 7601, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Manufacturing spearmint oil\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 7602, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Regina Jensen\" and transaction_type = 'invoice'" }, { "id": 7603, "SQL": "select transaction_date 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 = \"Social\" order by transaction_date asc limit 1 " }, { "id": 7604, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 7605, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kevin Scott\" ) " }, { "id": 7606, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Courtney King\" and account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 7607, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Justin Douglas\" ) " }, { "id": 7608, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Shelly Williams\" ) " }, { "id": 7609, "SQL": "select avg(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 = \"Austin Weaver\" and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 7610, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Emily Potter\" ) " }, { "id": 7611, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Catherine Ruiz' or vendor = 'Catherine Ruiz'" }, { "id": 7612, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 7613, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"James Ramsey\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 7614, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') and account_type in ('Expense','Other Expense') " }, { "id": 7615, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Marc Reyes\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 7616, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 7617, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Chris Mack\" ) " }, { "id": 7618, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 7619, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') 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') order by sum(debit) desc limit 1" }, { "id": 7620, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Laura Kane\" order by transaction_date limit 1" }, { "id": 7621, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') and account_type in ('Expense','Other Expense') " }, { "id": 7622, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Promotional\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 7623, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 7624, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Retailing Sleepers\") and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 7625, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Heidi Spencer' or vendor = 'Heidi Spencer'" }, { "id": 7626, "SQL": "select transaction_date from master_txn_table where customers = \"Kendra Shaw\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 7627, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sharon Brown\" ) " }, { "id": 7628, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 7629, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Kayla Crane MD\"" }, { "id": 7630, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Traveller accomodation\" " }, { "id": 7631, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 7632, "SQL": "select transaction_date from master_txn_table where customers = \"Steven Bailey\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 7633, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jose Cruz\"" }, { "id": 7634, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 7635, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 7636, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 7637, "SQL": "select product_service, 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 transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') group by product_service order by sum(credit) desc limit 1" }, { "id": 7638, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Joseph Erickson\" and transaction_type = 'invoice'" }, { "id": 7639, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 7640, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') order by sum(debit) desc limit 1" }, { "id": 7641, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Jessica Le\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) )" }, { "id": 7642, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Kaitlyn Hodges\"" }, { "id": 7643, "SQL": "select transaction_date from master_txn_table where customers = \"Debra Harper\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 7644, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Latasha Wilson\" ) " }, { "id": 7645, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 7646, "SQL": "select transaction_id from master_txn_table where product_service = \"Bedroom\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 7647, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') group by billing_city" }, { "id": 7648, "SQL": "select transaction_id from master_txn_table where product_service = \"Counseling\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 7649, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Tony Townsend\" ) " }, { "id": 7650, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Derrick Torres\" and account_type in ('Expense','Other Expense') 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') " }, { "id": 7651, "SQL": "select sum(credit) from master_txn_table where product_service = \"Tournaments and Matches\" and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 7652, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Foods on demand\" " }, { "id": 7653, "SQL": "select product_service, 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 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') group by product_service order by sum(credit) desc limit 1" }, { "id": 7654, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Alex Barnett\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") )" }, { "id": 7655, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 7656, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Richard Simmons\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 7657, "SQL": "select sum(credit) from master_txn_table where product_service = \"Non-nuclear\" and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 7658, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Julie Patterson\" ) " }, { "id": 7659, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 7660, "SQL": "select min(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 = \"Cory Massey\" and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 7661, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 7662, "SQL": "select transaction_date from master_txn_table where customers = \"Robert Jenkins\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 7663, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 7664, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Rebecca Valencia\" ) " }, { "id": 7665, "SQL": "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 Income\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 7666, "SQL": "select transaction_date from master_txn_table where customers = \"Chris Wong\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 7667, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 7668, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jennifer Pennington\" ) " }, { "id": 7669, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 7670, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 7671, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Paul Meyer\"" }, { "id": 7672, "SQL": "select sum(credit) from master_txn_table where product_service = \"Carriers\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 7673, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Alison Perry\" ) " }, { "id": 7674, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 7675, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sylvia Allen\" ) " }, { "id": 7676, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jacqueline Mcgee\" and transaction_type = 'invoice'" }, { "id": 7677, "SQL": "select distinct transaction_id from master_txn_table where customers = \"William Thomas\"" }, { "id": 7678, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Allison Russell\" ) " }, { "id": 7679, "SQL": "select transaction_date 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 = \"Cleaning\" order by transaction_date asc limit 1 " }, { "id": 7680, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") group by billing_city" }, { "id": 7681, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brenda Moore\" ) " }, { "id": 7682, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') group by billing_city" }, { "id": 7683, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"David Bolton\" order by transaction_date limit 1" }, { "id": 7684, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Manufacturing grapefruit oil\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 7685, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 7686, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) group by billing_city" }, { "id": 7687, "SQL": "select transaction_id from master_txn_table where customers = \"Dawn Lawson\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 7688, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Heather Hill\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) ) " }, { "id": 7689, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') group by product_service order by sum(credit) desc limit 1" }, { "id": 7690, "SQL": "select avg(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 = \"William Alvarez\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 7691, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Micheal Knight\" ) " }, { "id": 7692, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Roger Dunn\" and transaction_type = 'invoice'" }, { "id": 7693, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Melissa Leon\" ) " }, { "id": 7694, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Rebecca Ferrell\" ) " }, { "id": 7695, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Recognition software for the auto sector\") and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 7696, "SQL": "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,\"Telephone\") and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 7697, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 7698, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'James Cameron' or vendor = 'James Cameron'" }, { "id": 7699, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Michael Dawson\" ) " }, { "id": 7700, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Teresa Jimenez\" ) " }, { "id": 7701, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') 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') order by sum(debit) desc limit 1" }, { "id": 7702, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Gregory Herring\"" }, { "id": 7703, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 7704, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Makayla Dixon\" and transaction_type = 'invoice'" }, { "id": 7705, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 7706, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Cheryl Harrington' or vendor = 'Cheryl Harrington'" }, { "id": 7707, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Matthew Holland\"" }, { "id": 7708, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jordan Paul\" and transaction_type = 'invoice'" }, { "id": 7709, "SQL": "select transaction_id from master_txn_table where customers = \"Karen Stewart\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 7710, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Offering multi-strategy funds\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 7711, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 7712, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Wholesaling aeronautical equipment and supplies\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 7713, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Philip Davis\" ) " }, { "id": 7714, "SQL": "select transaction_date from master_txn_table where customers = \"Elizabeth Gamble\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 7715, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Kevin Delgado\" order by transaction_date limit 1" }, { "id": 7716, "SQL": "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,\"Motorbike \") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 7717, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Rebekah Daniel\" order by transaction_date limit 1" }, { "id": 7718, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jonathan Hammond\" ) " }, { "id": 7719, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Becky Fletcher\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 7720, "SQL": "select transaction_date from master_txn_table where customers = \"Crystal Mullen\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 7721, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') group by billing_city" }, { "id": 7722, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Amanda Sims\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 7723, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 7724, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 7725, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 7726, "SQL": "select transaction_date from master_txn_table where customers = \"Jessica Padilla\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 7727, "SQL": "select transaction_date from master_txn_table where customers = \"Heather Rose\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 7728, "SQL": "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,\"Hotels and motel services\") and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 7729, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jessica Underwood\" and transaction_type = 'invoice'" }, { "id": 7730, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Dawn Robinson\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 7731, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 7732, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Biogenic municipal waste-fueled power generation\") and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 7733, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 7734, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") and account_type in ('Expense','Other Expense') " }, { "id": 7735, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Blueprinting services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 7736, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Biomass electricity\" " }, { "id": 7737, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Alicia Rivera\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') ) " }, { "id": 7738, "SQL": "select transaction_id from master_txn_table where product_service = \"Oil and gas wells\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 7739, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Brandi Kelley\" and account_type in ('Expense','Other Expense') 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') " }, { "id": 7740, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 7741, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 7742, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Carolyn Lopez\" ) " }, { "id": 7743, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Development of other voice and speech recognition products\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 7744, "SQL": "select transaction_id from master_txn_table where customers = \"Steven Anderson\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 7745, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Leah Stark\" ) " }, { "id": 7746, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Accounts Receivable (A/R)\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 7747, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Emily Mcknight\" ) " }, { "id": 7748, "SQL": "select transaction_id from master_txn_table where product_service = \"Oil and gas wells\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 7749, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Repair & Maintenance (deleted)\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 7750, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Commissions & fees\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 7751, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Offering equity long-only\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 7752, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"James Bates\" ) " }, { "id": 7753, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Timothy Hill\"" }, { "id": 7754, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 7755, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Baby clothing and footwear\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 7756, "SQL": "select transaction_date from master_txn_table where customers = \"Albert Soto\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 7757, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 7758, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Parking lot and driveway washing\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 7759, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 7760, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Anna Odonnell\"" }, { "id": 7761, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brenda Jimenez\" ) " }, { "id": 7762, "SQL": "select sum(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Chimney sweep services\" " }, { "id": 7763, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 7764, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 7765, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Abigail Parks\" ) " }, { "id": 7766, "SQL": "select transaction_id from master_txn_table where product_service = \"Quality accreditation\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 7767, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Care-planning services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 7768, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 7769, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Ethan Sherman\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 7770, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 7771, "SQL": "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 loading and unloading services at rail terminals\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 7772, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Jason Bentley\" and transaction_type = 'payment' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') )" }, { "id": 7773, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Crystal Martinez\" and transaction_type = 'invoice'" }, { "id": 7774, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Oxygen manufacturing\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 7775, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Brandon Aguilar\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) ) " }, { "id": 7776, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Larry Schwartz\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) ) " }, { "id": 7777, "SQL": "select sum(credit) from master_txn_table where product_service = \"Traveller accomodation\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 7778, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Barbara Myers\" ) " }, { "id": 7779, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Martin Thomas\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 7780, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Susan Robertson\" ) " }, { "id": 7781, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Youth community center services\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 7782, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ronald Weeks\" ) " }, { "id": 7783, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Baby car seats\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 7784, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 7785, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Gregory Guerra\" ) " }, { "id": 7786, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 7787, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Danielle Perry\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) )" }, { "id": 7788, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Nancy Anderson DVM\" ) " }, { "id": 7789, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 7790, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 7791, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Jeremy Smith\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 7792, "SQL": "select transaction_date from master_txn_table where customers = \"Paula Farrell\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 7793, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 7794, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Shannon Rhodes\" order by transaction_date limit 1" }, { "id": 7795, "SQL": "select transaction_id from master_txn_table where customers = \"Taylor Fields\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 7796, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Job Expenses\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 7797, "SQL": "select transaction_date from master_txn_table where customers = \"Kimberly Gibson\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 7798, "SQL": "select transaction_id from master_txn_table where customers = \"James Steele\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 7799, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Monica Griffith\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 7800, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Leah Baker\" ) " }, { "id": 7801, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Livestock health services\") and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 7802, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Vickie Larsen\" ) " }, { "id": 7803, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Edwin Compton\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) )" }, { "id": 7804, "SQL": "select transaction_id from master_txn_table where customers = \"Keith Johnson\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 7805, "SQL": "select sum(credit) from master_txn_table where product_service = \"Construction activities\" and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 7806, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 7807, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Ventilation cleaning\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 7808, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Brian Wood\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 7809, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Youth guidance services\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 7810, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 7811, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 7812, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kelsey Miller\" ) " }, { "id": 7813, "SQL": "select transaction_date from master_txn_table where customers = \"Jacqueline White\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 7814, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 7815, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Karen Martinez\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') )" }, { "id": 7816, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Levi Griffin\"" }, { "id": 7817, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Michael Green\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 7818, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jacob Wilson\" ) " }, { "id": 7819, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Michelle West\" ) " }, { "id": 7820, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Elizabeth Murray\" order by transaction_date limit 1" }, { "id": 7821, "SQL": "select sum(credit) from master_txn_table where product_service = \"Construction activities\" 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') " }, { "id": 7822, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Claire Rodriguez\"" }, { "id": 7823, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Jeremy Acosta\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) )" }, { "id": 7824, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Bethany Harrison\" ) " }, { "id": 7825, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Ivan Vargas\"" }, { "id": 7826, "SQL": "select transaction_date 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 = \"Gifts and grants\" order by transaction_date asc limit 1 " }, { "id": 7827, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 7828, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 7829, "SQL": "select transaction_id from master_txn_table where product_service = \"Homemaker and companion\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 7830, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kevin Chung\" ) " }, { "id": 7831, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Brandy Smith' or vendor = 'Brandy Smith'" }, { "id": 7832, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Chad Hernandez\" ) " }, { "id": 7833, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 7834, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 7835, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Kimberly Martinez' or vendor = 'Kimberly Martinez'" }, { "id": 7836, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Andrew Vargas\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 7837, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 7838, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Michael Harris\"" }, { "id": 7839, "SQL": "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 financing related to securities\") and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 7840, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Mary Ibarra\" and transaction_type = 'invoice'" }, { "id": 7841, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 7842, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Madison Williams\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date) AND date(current_date) )" }, { "id": 7843, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Annette Flores\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 7844, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Vicki Nguyen\" and transaction_type = 'invoice'" }, { "id": 7845, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Suzanne Smith\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 7846, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Emily Hall\" ) " }, { "id": 7847, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Brian Wood\"" }, { "id": 7848, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ashlee Thomas\" ) " }, { "id": 7849, "SQL": "select sum(credit) from master_txn_table where product_service = \"Oil field Machinery\" and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 7850, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Ethical Hacking Training\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 7851, "SQL": "select transaction_date 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 = \"Shipping\" order by transaction_date asc limit 1 " }, { "id": 7852, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 7853, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 7854, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Invitations\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 7855, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Courtney Reed PhD\" order by transaction_date limit 1" }, { "id": 7856, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Connor Rodriguez\" order by transaction_date limit 1" }, { "id": 7857, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Shearing services\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 7858, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Nathaniel Fischer\" order by transaction_date limit 1" }, { "id": 7859, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 7860, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 7861, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Steven Wells\" ) " }, { "id": 7862, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Travis Moore\" ) " }, { "id": 7863, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Christina Gray\" ) " }, { "id": 7864, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Teresa Mcdonald\" order by transaction_date limit 1" }, { "id": 7865, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 7866, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Tracy Floyd\" ) " }, { "id": 7867, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Samuel Adams\"" }, { "id": 7868, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Susan Kane\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 7869, "SQL": "select transaction_id from master_txn_table where customers = \"Alyssa English\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 7870, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 7871, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Courtney Garcia\" ) " }, { "id": 7872, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 7873, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brian Hampton\" ) " }, { "id": 7874, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jennifer Lang\" and transaction_type = 'invoice'" }, { "id": 7875, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Anna Bond\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 7876, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Ronald Ramos\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 7877, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Nancy Anderson\" ) " }, { "id": 7878, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brent Carey\" ) " }, { "id": 7879, "SQL": "select transaction_date 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 = \"Heavy construction equipment\" order by transaction_date asc limit 1 " }, { "id": 7880, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Tammy Guzman\" and transaction_type = 'invoice'" }, { "id": 7881, "SQL": "select transaction_date from master_txn_table where customers = \"James Frazier\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 7882, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 7883, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Maria Peters\" ) " }, { "id": 7884, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 7885, "SQL": "select sum(credit) from master_txn_table where product_service = \"Surveying wells\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 7886, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 7887, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Melinda Wilson\" order by transaction_date limit 1" }, { "id": 7888, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Michael Diaz\" ) " }, { "id": 7889, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Acetylene manufacturing\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 7890, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sabrina Quinn\" ) " }, { "id": 7891, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 7892, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Daryl English\" ) " }, { "id": 7893, "SQL": "select transaction_date 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 = \"Diving\" order by transaction_date asc limit 1 " }, { "id": 7894, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 7895, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Kelly Hoffman\"" }, { "id": 7896, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 7897, "SQL": "select transaction_date from master_txn_table where customers = \"Brittany Campbell\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 7898, "SQL": "select transaction_date 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 = \"Tournaments and Matches\" order by transaction_date asc limit 1 " }, { "id": 7899, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"David George\" ) " }, { "id": 7900, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Fernando Butler\" order by transaction_date limit 1" }, { "id": 7901, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 7902, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Anna Barrera\" ) " }, { "id": 7903, "SQL": "select transaction_id from master_txn_table where product_service = \"Fishing\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 7904, "SQL": "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,\"Nitrogen manufacturing\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 7905, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 7906, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Tammy Fuller' or vendor = 'Tammy Fuller'" }, { "id": 7907, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 7908, "SQL": "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,\"Constructing duplexes\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 7909, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Wholesaling marine supplies (except pleasure)\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 7910, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 7911, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"John Snow\" ) " }, { "id": 7912, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') group by billing_city" }, { "id": 7913, "SQL": "select transaction_id from master_txn_table where product_service = \"Nonfossil-fuel\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 7914, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ryan Walker\" ) " }, { "id": 7915, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Kristin Thomas\"" }, { "id": 7916, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Foster care placement services\") and 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') " }, { "id": 7917, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Robert Pitts\" ) " }, { "id": 7918, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jasmine Ayers\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 7919, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") order by sum(debit) desc limit 1" }, { "id": 7920, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 7921, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 7922, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Hotels and motel services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 7923, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') order by sum(debit) desc limit 1" }, { "id": 7924, "SQL": "select transaction_id from master_txn_table where customers = \"Crystal Morales\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 7925, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 7926, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Judith Jones\" ) " }, { "id": 7927, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Taylor Hall\" ) " }, { "id": 7928, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 7929, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Gabriel Shelton\"" }, { "id": 7930, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and 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') order by sum(debit) desc limit 1" }, { "id": 7931, "SQL": "select sum(credit) from master_txn_table where product_service = \"Opera\" and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 7932, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 7933, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Providing support for money investment securities\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 7934, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Julian Flores\" ) " }, { "id": 7935, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 7936, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Tina Gibbs\"" }, { "id": 7937, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brenda Yates\" ) " }, { "id": 7938, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 7939, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Megan George\" order by transaction_date limit 1" }, { "id": 7940, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Kyle Ali' or vendor = 'Kyle Ali'" }, { "id": 7941, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 7942, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Coal\" " }, { "id": 7943, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Patricia Jackson\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 7944, "SQL": "select max(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 = \"Christopher Hill\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 7945, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 7946, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 7947, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Manufacturing other Natural oils\") and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 7948, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kelly Zhang\" ) " }, { "id": 7949, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 7950, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 7951, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Other nonfossil-fuel power generation\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 7952, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Patricia Cruz\" order by transaction_date limit 1" }, { "id": 7953, "SQL": "select transaction_id from master_txn_table where customers = \"Kathy Evans\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 7954, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Rental Services\") and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 7955, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Shelly Avery\" ) " }, { "id": 7956, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Amy Perez\" ) " }, { "id": 7957, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 7958, "SQL": "select transaction_date 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 = \"Exercise\" order by transaction_date asc limit 1 " }, { "id": 7959, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Christy Freeman\" and account_type in ('Expense','Other Expense') and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 7960, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Bonnie Johnson\" ) " }, { "id": 7961, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 7962, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Cole Morris\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') ) " }, { "id": 7963, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Dance performances\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 7964, "SQL": "select transaction_date from master_txn_table where customers = \"Ashley Mccormick\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 7965, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 7966, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Roger Bates\" ) " }, { "id": 7967, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Gabriela Harris\" and transaction_type = 'invoice'" }, { "id": 7968, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Daniel Arellano\" ) " }, { "id": 7969, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Matthew Kelley\" ) " }, { "id": 7970, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Abandoned infant assistance\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 7971, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 7972, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Clinton Rojas\"" }, { "id": 7973, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Alex Costa\"" }, { "id": 7974, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Candice Pope\" ) " }, { "id": 7975, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Daniel Brock\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') ) " }, { "id": 7976, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 7977, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Matthew Frazier\" ) " }, { "id": 7978, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Maria Mosley' or vendor = 'Maria Mosley'" }, { "id": 7979, "SQL": "select transaction_id from master_txn_table where customers = \"Rita Liu\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 7980, "SQL": "select product_service, 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 transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') group by product_service order by sum(credit) desc limit 1" }, { "id": 7981, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Richard Simmons\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 7982, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Alyssa Boyd DVM\" order by transaction_date limit 1" }, { "id": 7983, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 7984, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Development of other voice and speech recognition products\") 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') " }, { "id": 7985, "SQL": "select sum(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Construction management\" " }, { "id": 7986, "SQL": "select transaction_date from master_txn_table where customers = \"Keith Wilson DDS\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 7987, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jeffrey Knight\" ) " }, { "id": 7988, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Traci Nunez\" ) " }, { "id": 7989, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Farrier services\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 7990, "SQL": "select transaction_date from master_txn_table where customers = \"Jerome Hamilton\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 7991, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 7992, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Caitlin Baxter\" ) " }, { "id": 7993, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Shelly Reeves\" ) " }, { "id": 7994, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 7995, "SQL": "select transaction_id from master_txn_table where product_service = \"Financial Planning\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 7996, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Stephanie Key\" ) " }, { "id": 7997, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') 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') group by billing_city" }, { "id": 7998, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Megan Hardin\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') ) " }, { "id": 7999, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and 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') " }, { "id": 8000, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 8001, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Ethan Jennings\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) )" }, { "id": 8002, "SQL": "select transaction_id from master_txn_table where customers = \"Julia Valencia\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 8003, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 8004, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Claire Curtis\" ) " }, { "id": 8005, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Linda Williams' or vendor = 'Linda Williams'" }, { "id": 8006, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Jason Walton\"" }, { "id": 8007, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Douglas Turner\" ) " }, { "id": 8008, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 8009, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 8010, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Blake Golden\"" }, { "id": 8011, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 8012, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Michael Myers\" order by transaction_date limit 1" }, { "id": 8013, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Travel\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 8014, "SQL": "select transaction_date from master_txn_table where customers = \"Julia Ward\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 8015, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 8016, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 8017, "SQL": "select transaction_id from master_txn_table where product_service = \"Nitrogen\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 8018, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 8019, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') and account_type in ('Expense','Other Expense') " }, { "id": 8020, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') group by billing_city" }, { "id": 8021, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Justin Klein\"" }, { "id": 8022, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Bryan Flores\" ) " }, { "id": 8023, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 8024, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"James Mcdowell\" ) " }, { "id": 8025, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 8026, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 8027, "SQL": "select sum(credit) from master_txn_table where product_service = \"Coal Pwer\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 8028, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Jason Carter\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") ) " }, { "id": 8029, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jordan Williams\" order by transaction_date limit 1" }, { "id": 8030, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by billing_city" }, { "id": 8031, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Computer Repair and Maintainenance\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 8032, "SQL": "select transaction_date from master_txn_table where customers = \"Daniel Camacho\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 8033, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Benjamin Mcfarland\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 8034, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Beverly Kaiser\" ) " }, { "id": 8035, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 8036, "SQL": "select sum(credit) from master_txn_table where product_service = \"attached and detached units\" and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 8037, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name 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 account_type in ('Expense','Other Expense') " }, { "id": 8038, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Amateur sports teams and club servcies\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 8039, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 8040, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 8041, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Kathy Matthews\"" }, { "id": 8042, "SQL": "select transaction_id from master_txn_table where customers = \"Tracey Kennedy\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 8043, "SQL": "select transaction_id from master_txn_table where product_service = \"Window washing\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 8044, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Baby clothing and footwear\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 8045, "SQL": "select transaction_date from master_txn_table where customers = \"Ryan Thompson\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 8046, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 8047, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Robert Mercado\"" }, { "id": 8048, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Jessica Greer' or vendor = 'Jessica Greer'" }, { "id": 8049, "SQL": "select transaction_date from master_txn_table where customers = \"Nicole Gilbert\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 8050, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Mary Black\" ) " }, { "id": 8051, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 8052, "SQL": "select sum(credit) from master_txn_table where product_service = \"Bicycle\" 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') " }, { "id": 8053, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Database management\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 8054, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 8055, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Gregory Terry\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 8056, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Brian Oneal\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) ) " }, { "id": 8057, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"William Dean\" order by transaction_date limit 1" }, { "id": 8058, "SQL": "select transaction_date 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 = \"Navigational Instruments\" order by transaction_date asc limit 1 " }, { "id": 8059, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' 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') " }, { "id": 8060, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Manufacturing citronella oil\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 8061, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Copy centers\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 8062, "SQL": "select transaction_date 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 = \"Duct and gutter cleaning\" order by transaction_date asc limit 1 " }, { "id": 8063, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Nicole Mathis\" ) " }, { "id": 8064, "SQL": "select transaction_id from master_txn_table where product_service = \"Railroad Cars\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 8065, "SQL": "select transaction_id from master_txn_table where product_service = \"Acetylene\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 8066, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Erica Smith\" order by transaction_date limit 1" }, { "id": 8067, "SQL": "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,\"Teen outreach services\") and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 8068, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"David Nichols\" and account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 8069, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Shane Lee\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 8070, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"April White\" ) " }, { "id": 8071, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Christian Ray\" order by transaction_date limit 1" }, { "id": 8072, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Boat, ship and steamship rental or leasing\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 8073, "SQL": "select sum(credit) from master_txn_table where product_service = \"Foods on demand\" and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 8074, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Robert Mcintyre\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') )" }, { "id": 8075, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Heavy construction equipment\" " }, { "id": 8076, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 8077, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 8078, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Anthony Carey\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 8079, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Robert Harmon\" ) " }, { "id": 8080, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Tonya Gill\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') ) " }, { "id": 8081, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Office Expenses\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 8082, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Refunds-Allowances\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 8083, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by billing_city" }, { "id": 8084, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') and account_type in ('Expense','Other Expense') " }, { "id": 8085, "SQL": "select transaction_date 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 = \"Appearances and speeches\" order by transaction_date asc limit 1 " }, { "id": 8086, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 8087, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Justin Richardson\" order by transaction_date limit 1" }, { "id": 8088, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Musical performances\") and 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') " }, { "id": 8089, "SQL": "select transaction_date from master_txn_table where customers = \"Kristine Parker\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 8090, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"James Little\" ) " }, { "id": 8091, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 8092, "SQL": "select transaction_date 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 = \"Organic Gases\" order by transaction_date asc limit 1 " }, { "id": 8093, "SQL": "select transaction_id from master_txn_table where product_service = \"Golf\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 8094, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 8095, "SQL": "select min(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 = \"Vanessa Burns\" and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 8096, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 8097, "SQL": "select transaction_date from master_txn_table where customers = \"Jerry Mcneil\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 8098, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ariel King\" ) " }, { "id": 8099, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Crystal Williams\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') )" }, { "id": 8100, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Katrina Hester\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 8101, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Aircraft rental or leasing\") and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 8102, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 8103, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 8104, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Juan Cervantes\" ) " }, { "id": 8105, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') group by billing_city" }, { "id": 8106, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Chase Jenkins\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 8107, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 8108, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Adam Lucero\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 8109, "SQL": "select transaction_date from master_txn_table where customers = \"Kristi Price\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 8110, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lisa Black\" ) " }, { "id": 8111, "SQL": "select transaction_id from master_txn_table where product_service = \"Life cycle asset management\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 8112, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Denise Mckee\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') )" }, { "id": 8113, "SQL": "select transaction_date 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 = \"Installation\" order by transaction_date asc limit 1 " }, { "id": 8114, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Tara Washington\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) )" }, { "id": 8115, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Catherine Perry\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 8116, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 8117, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 8118, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Steve Williams\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 8119, "SQL": "select sum(credit) from master_txn_table where product_service = \"Nitrogen\" and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 8120, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Lance Martin\" order by transaction_date limit 1" }, { "id": 8121, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Carol Reeves\" order by transaction_date limit 1" }, { "id": 8122, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Eric Coleman\" ) " }, { "id": 8123, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Kenneth Franklin\"" }, { "id": 8124, "SQL": "select transaction_id from master_txn_table where product_service = \"Computer Programming\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 8125, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 8126, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 8127, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Disposal Fees\") 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') " }, { "id": 8128, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 8129, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 8130, "SQL": "select transaction_id from master_txn_table where product_service = \"Locomotives\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 8131, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Mary Blake\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') ) " }, { "id": 8132, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Brent Barnett\"" }, { "id": 8133, "SQL": "select max(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 = \"Samantha Miller\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 8134, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Refunds-Allowances\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 8135, "SQL": "select avg(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 = \"Sue Jackson\" and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 8136, "SQL": "select transaction_date 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 = \"Repair\" order by transaction_date asc limit 1 " }, { "id": 8137, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 8138, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Anthony Higgins\"" }, { "id": 8139, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Renee Swanson\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') ) " }, { "id": 8140, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"David Patton\" and transaction_type = 'payment' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') )" }, { "id": 8141, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Carlos Hernandez\"" }, { "id": 8142, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 8143, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') order by sum(debit) desc limit 1" }, { "id": 8144, "SQL": "select min(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 = \"Jennifer Mullins\" and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 8145, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Development of software products for Macs\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 8146, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 8147, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 8148, "SQL": "select transaction_date from master_txn_table where customers = \"Jon Shea\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 8149, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Gabrielle Gray\" ) " }, { "id": 8150, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Cindy Richards\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') )" }, { "id": 8151, "SQL": "select transaction_date from master_txn_table where customers = \"Jason Rivera\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 8152, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 8153, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Job Expenses\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 8154, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 8155, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Troy Leblanc\" ) " }, { "id": 8156, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 8157, "SQL": "select transaction_date 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 = \"Biomass electricity\" order by transaction_date asc limit 1 " }, { "id": 8158, "SQL": "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,\"Travel Meals\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 8159, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 8160, "SQL": "select transaction_date from master_txn_table where customers = \"Anthony Rich\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 8161, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Miranda Mckenzie\" ) " }, { "id": 8162, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Latoya Wilkins\" order by transaction_date limit 1" }, { "id": 8163, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where 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') and account_type in ('Expense','Other Expense') " }, { "id": 8164, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 8165, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Stacy Vega\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 8166, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Cassandra Carr\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 8167, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Application service provisioning\") and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 8168, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 8169, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Nicole Mora\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) ) " }, { "id": 8170, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Brandi Hale MD\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 8171, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Patricia Guzman\" order by transaction_date limit 1" }, { "id": 8172, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"John Little MD\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 8173, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Courtney Thompson\"" }, { "id": 8174, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jamie Church\" order by transaction_date limit 1" }, { "id": 8175, "SQL": "select transaction_id from master_txn_table where customers = \"Jennifer James\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 8176, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Workers Compensation\") and vendor = \"William Armstrong\"" }, { "id": 8177, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Miscellaneous\" " }, { "id": 8178, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 8179, "SQL": "select transaction_date 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 = \"Foods on demand\" order by transaction_date asc limit 1 " }, { "id": 8180, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Gary Weiss\" and transaction_type = 'invoice'" }, { "id": 8181, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 8182, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Metal ore\" " }, { "id": 8183, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jeffery Robinson\" order by transaction_date limit 1" }, { "id": 8184, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 8185, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Natalie Romero\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) )" }, { "id": 8186, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Reprographic services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 8187, "SQL": "select transaction_date from master_txn_table where customers = \"Lawrence Hall\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 8188, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Adam Graves\" ) " }, { "id": 8189, "SQL": "select transaction_id from master_txn_table where customers = \"Michael Todd\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 8190, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"David Green\" ) " }, { "id": 8191, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name 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 account_type in ('Expense','Other Expense') " }, { "id": 8192, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 8193, "SQL": "select transaction_date from master_txn_table where customers = \"Barbara Gordon DDS\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 8194, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 8195, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Timothy Herrera\" ) " }, { "id": 8196, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Wind Power generation\") and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 8197, "SQL": "select transaction_id from master_txn_table where product_service = \"Construction management\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 8198, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Marissa Duarte\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 8199, "SQL": "select sum(credit) from master_txn_table where product_service = \"Popular music shows\" and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 8200, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 8201, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 8202, "SQL": "select min(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 = \"Dave Wyatt\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 8203, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Coin operated games and rides\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 8204, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kelli Charles\" ) " }, { "id": 8205, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 8206, "SQL": "select sum(credit) from master_txn_table where product_service = \"Healthcare\" and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 8207, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Joseph Moore\" ) " }, { "id": 8208, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Alexis Kirk\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 8209, "SQL": "select transaction_date 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 = \"Nursing and health\" order by transaction_date asc limit 1 " }, { "id": 8210, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Ceremony & reception venue\") and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 8211, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 8212, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 8213, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jasmine Mccormick\" order by transaction_date limit 1" }, { "id": 8214, "SQL": "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 lemon oil\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 8215, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Allison Rodriguez\" ) " }, { "id": 8216, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Providing other outdoor maintenance services\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 8217, "SQL": "select transaction_id from master_txn_table where product_service = \"Printing\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 8218, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Dues & Subscriptions\") and vendor = \"Samuel Bishop\"" }, { "id": 8219, "SQL": "select transaction_date from master_txn_table where customers = \"Steven Newton\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 8220, "SQL": "select sum(credit) from master_txn_table where product_service = \"Inorganic Gases\" and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 8221, "SQL": "select transaction_date 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 = \"Transportation\" order by transaction_date asc limit 1 " }, { "id": 8222, "SQL": "select sum(credit) from master_txn_table where product_service = \"Web hosting\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 8223, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 8224, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') group by billing_city" }, { "id": 8225, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 8226, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Computer operation training\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 8227, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Adoption placement services\") and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 8228, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Kimberly Sutton\" order by transaction_date limit 1" }, { "id": 8229, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 8230, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Emily Walton\" and transaction_type = 'invoice'" }, { "id": 8231, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 8232, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 8233, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Yvonne Rodriguez\" ) " }, { "id": 8234, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Janet Shelton\" ) " }, { "id": 8235, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Chelsea Haynes\" order by transaction_date limit 1" }, { "id": 8236, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sarah Mcdaniel\" ) " }, { "id": 8237, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Zachary Huang\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 8238, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') group by billing_city" }, { "id": 8239, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Nancy Thomas\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 8240, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jamie Lopez\" ) " }, { "id": 8241, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Towboat and tugboat rental or leasing\") and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 8242, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Kevin Sellers\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') )" }, { "id": 8243, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"James Cox\" ) " }, { "id": 8244, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Charlene Hughes\" order by transaction_date limit 1" }, { "id": 8245, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 8246, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 8247, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Stacey Lopez\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 8248, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 8249, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Charles Peters\"" }, { "id": 8250, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 8251, "SQL": "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 = \"Jonathan Wolfe\" and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 8252, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Anthony King\" ) " }, { "id": 8253, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Karen Allen\" order by transaction_date limit 1" }, { "id": 8254, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Brandon Oneal\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) ) " }, { "id": 8255, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 8256, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Peter Reese\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) ) " }, { "id": 8257, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Teen outreach services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 8258, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') group by billing_city" }, { "id": 8259, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 8260, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Patricia Norman\" ) " }, { "id": 8261, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 8262, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date) AND date(current_date) group by billing_city" }, { "id": 8263, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Katrina Hester\" ) " }, { "id": 8264, "SQL": "select transaction_date from master_txn_table where customers = \"Dennis Harris\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 8265, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"David Nichols\"" }, { "id": 8266, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"April Williams\" ) " }, { "id": 8267, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"James Cameron\" order by transaction_date limit 1" }, { "id": 8268, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Manufacturing other Natural oils\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 8269, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 8270, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kristine Cook\" ) " }, { "id": 8271, "SQL": "select sum(credit) from master_txn_table where product_service = \"Barge\" and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 8272, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and 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') " }, { "id": 8273, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 8274, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 8275, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 8276, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' 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') " }, { "id": 8277, "SQL": "select min(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 = \"Linda Miller\" and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 8278, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 8279, "SQL": "select max(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 = \"Shawn Bishop\" and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 8280, "SQL": "select transaction_id from master_txn_table where customers = \"Peter Davis\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 8281, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Private mailbox rental services\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 8282, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Julie Sullivan\" ) " }, { "id": 8283, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Samantha Fuller\"" }, { "id": 8284, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Catering services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 8285, "SQL": "select transaction_id from master_txn_table where customers = \"Amanda Duran\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 8286, "SQL": "select transaction_date from master_txn_table where customers = \"Richard Manning\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 8287, "SQL": "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,\"Swimming pool Cleaning\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 8288, "SQL": "select transaction_date 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 = \"Environmental impact assessment\" order by transaction_date asc limit 1 " }, { "id": 8289, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Medical services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 8290, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 8291, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Robert Vasquez\" and transaction_type = 'invoice'" }, { "id": 8292, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 8293, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Paula Moon\" ) " }, { "id": 8294, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ashley Blake DDS\" ) " }, { "id": 8295, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Therapy\" " }, { "id": 8296, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Tammy Johnson\"" }, { "id": 8297, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Riley Barrett\" ) " }, { "id": 8298, "SQL": "select transaction_id from master_txn_table where customers = \"Rachel Cook\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 8299, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') order by sum(debit) desc limit 1" }, { "id": 8300, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 8301, "SQL": "select max(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 = \"Caitlin Mcintosh\" and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 8302, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 8303, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and 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') " }, { "id": 8304, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Exercise equipment retailing\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 8305, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Melissa Hogan\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 8306, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Karen Jones\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 8307, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Joseph Fowler\"" }, { "id": 8308, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Lori Small\"" }, { "id": 8309, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Scott Wilkerson\" ) " }, { "id": 8310, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Angela Holmes\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') ) " }, { "id": 8311, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Steve Dalton\" order by transaction_date limit 1" }, { "id": 8312, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 8313, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Memberships\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 8314, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Donna Jimenez\" order by transaction_date limit 1" }, { "id": 8315, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Kimberly Kelly MD\" order by transaction_date limit 1" }, { "id": 8316, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Warren Morrison\"" }, { "id": 8317, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 8318, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by billing_city" }, { "id": 8319, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Providing brokerage services\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 8320, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Peter Ramirez\" order by transaction_date limit 1" }, { "id": 8321, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Shawn Garza\" and account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 8322, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Hannah Wheeler\" ) " }, { "id": 8323, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 8324, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Michelle Melton\" ) " }, { "id": 8325, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Vincent Perez\" ) " }, { "id": 8326, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Business services centers\") and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 8327, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 8328, "SQL": "select transaction_id from master_txn_table where product_service = \"environmental projects\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 8329, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Adam Stokes\" ) " }, { "id": 8330, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Janet Baker\" ) " }, { "id": 8331, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Katelyn Alvarez\" ) " }, { "id": 8332, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jordan Harris\" ) " }, { "id": 8333, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 8334, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 8335, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 8336, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 8337, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 8338, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Ashley Castro\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') ) " }, { "id": 8339, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Dance performances\") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 8340, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Andre Phelps\" ) " }, { "id": 8341, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') group by billing_city" }, { "id": 8342, "SQL": "select transaction_id from master_txn_table where customers = \"Sarah Freeman\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 8343, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Campground and RV park services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 8344, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Bradley Lloyd\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 8345, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"George Sparks\" ) " }, { "id": 8346, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Richard Morgan\" and transaction_type = 'invoice'" }, { "id": 8347, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Amanda Molina' or vendor = 'Amanda Molina'" }, { "id": 8348, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Shearing services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 8349, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Linda Morgan\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 8350, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 8351, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 8352, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 8353, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Design and management services\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 8354, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jennifer Kelly\" ) " }, { "id": 8355, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Laura Yates\" order by transaction_date limit 1" }, { "id": 8356, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Christopher Russell\"" }, { "id": 8357, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Chelsea Mason\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') ) " }, { "id": 8358, "SQL": "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 support services for commodity markets\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 8359, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Gas and Electric\") and vendor = \"Anna Bond\"" }, { "id": 8360, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Justin Atkins DDS\" order by transaction_date limit 1" }, { "id": 8361, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 8362, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Bobby Williams\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) ) " }, { "id": 8363, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Patrick Castro\"" }, { "id": 8364, "SQL": "select transaction_id from master_txn_table where customers = \"Karen Ward\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 8365, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Rail transportation support and other products\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 8366, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Julian Flores' or vendor = 'Julian Flores'" }, { "id": 8367, "SQL": "select sum(credit) from master_txn_table where product_service = \"Home Therapy\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 8368, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Scott Schroeder\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 8369, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Retailing bedding\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 8370, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 8371, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 8372, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Bobby Gonzales\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 8373, "SQL": "select product_service, 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 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') group by product_service order by sum(credit) desc limit 1" }, { "id": 8374, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Joseph Morrow\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 8375, "SQL": "select sum(credit) from master_txn_table where product_service = \"Eucalyptus oil\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 8376, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 8377, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Steve Smith\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 8378, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Katrina Stephenson\" ) " }, { "id": 8379, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Willie Martinez\" order by transaction_date limit 1" }, { "id": 8380, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Dawn Fitzgerald\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 8381, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 8382, "SQL": "select product_service, 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 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') group by product_service order by sum(credit) desc limit 1" }, { "id": 8383, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Taylor Sloan' or vendor = 'Taylor Sloan'" }, { "id": 8384, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 8385, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 8386, "SQL": "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,\"Full-service restaurants\") and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 8387, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 8388, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 8389, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kylie Hall\" ) " }, { "id": 8390, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Paige Howard\" ) " }, { "id": 8391, "SQL": "select transaction_id from master_txn_table where product_service = \"Geothermal\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 8392, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Darlene Buckley\" order by transaction_date limit 1" }, { "id": 8393, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Julian Harris\" ) " }, { "id": 8394, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Kimberly Ramos\"" }, { "id": 8395, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Hannah Norman\" order by transaction_date limit 1" }, { "id": 8396, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Kevin Alvarez\" order by transaction_date limit 1" }, { "id": 8397, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Unapplied Cash Bill Payment Expense\") and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 8398, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 8399, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jason Grimes\" order by transaction_date limit 1" }, { "id": 8400, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Photography\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 8401, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 8402, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Haley Gomez\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 8403, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Offering fixed income funds\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 8404, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Sherri Rios\" and transaction_type = 'invoice'" }, { "id": 8405, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Nancy Young\" ) " }, { "id": 8406, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Retailing bedding\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 8407, "SQL": "select transaction_date from master_txn_table where customers = \"Stacy Rose\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 8408, "SQL": "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,\"Catering services\") and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 8409, "SQL": "select transaction_date 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 = \"Service Provider\" order by transaction_date asc limit 1 " }, { "id": 8410, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Christine Golden\" ) " }, { "id": 8411, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Daisy Williams\" ) " }, { "id": 8412, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 8413, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Other nonnuclear power generation\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 8414, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Omar Robinson\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 8415, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Cole Scott\" ) " }, { "id": 8416, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Travel Meals\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 8417, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Workers Compensation\") and vendor = \"Kristen Skinner\"" }, { "id": 8418, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Elizabeth Stanley\" ) " }, { "id": 8419, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 8420, "SQL": "select transaction_date from master_txn_table where customers = \"Cathy Oneal\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 8421, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 8422, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 8423, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"John Page\"" }, { "id": 8424, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Christopher Calhoun\"" }, { "id": 8425, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kristen Mack\" ) " }, { "id": 8426, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)group by product_service order by sum(credit) desc limit 1" }, { "id": 8427, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Baby car seats\") and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 8428, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Bradley Herman\" ) " }, { "id": 8429, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Decks and Patios\") and vendor = \"Daniel Davis\"" }, { "id": 8430, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and 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') order by sum(debit) desc limit 1" }, { "id": 8431, "SQL": "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,\"Golf equipment and supply retailing\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 8432, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Heather Ferguson DDS' or vendor = 'Heather Ferguson DDS'" }, { "id": 8433, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Michelle Calderon\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) )" }, { "id": 8434, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Shane Michael\" ) " }, { "id": 8435, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 8436, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 8437, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 8438, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 8439, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Timothy Wilson\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 8440, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Courtney Snyder\" ) " }, { "id": 8441, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Patricia Meza\" ) " }, { "id": 8442, "SQL": "select transaction_id from master_txn_table where product_service = \"Navigational Instruments\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 8443, "SQL": "select sum(credit) from master_txn_table where product_service = \"Casings, Tubes and Rods\" and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 8444, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lindsey Watson\" ) " }, { "id": 8445, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 8446, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Caroline Walker\" ) " }, { "id": 8447, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Andrew Wilkins\" ) " }, { "id": 8448, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jeff Singh\" order by transaction_date limit 1" }, { "id": 8449, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') order by sum(debit) desc limit 1" }, { "id": 8450, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Youth guidance services\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 8451, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Marcus Ingram\" ) " }, { "id": 8452, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Melissa Buchanan\"" }, { "id": 8453, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 8454, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Maria Hudson\" ) " }, { "id": 8455, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Providing financial investment management services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 8456, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Abigail Roberts\" order by transaction_date limit 1" }, { "id": 8457, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 8458, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Timothy Holt\" and transaction_type = 'invoice'" }, { "id": 8459, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Jason Barajas\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') ) " }, { "id": 8460, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Bradley Clark\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') ) " }, { "id": 8461, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Hunter Decker\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) )" }, { "id": 8462, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 8463, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sean Gray\" ) " }, { "id": 8464, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') order by sum(debit) desc limit 1" }, { "id": 8465, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 8466, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") group by product_service order by sum(credit) desc limit 1" }, { "id": 8467, "SQL": "select product_service, 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 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') group by product_service order by sum(credit) desc limit 1" }, { "id": 8468, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Rebecca Roach\"" }, { "id": 8469, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Gordon Walker\" ) " }, { "id": 8470, "SQL": "select transaction_date from master_txn_table where customers = \"Jason Hernandez\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 8471, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 8472, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Saddlery retailing\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 8473, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"John Eaton\" ) " }, { "id": 8474, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 8475, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Adrian Walker\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 8476, "SQL": "select transaction_id from master_txn_table where product_service = \"Towboat\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 8477, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Austin Grant\" order by transaction_date limit 1" }, { "id": 8478, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 8479, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Dues & Subscriptions\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 8480, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jennifer Ellis\" order by transaction_date limit 1" }, { "id": 8481, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Alejandro Ortiz PhD\" ) " }, { "id": 8482, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 8483, "SQL": "select transaction_id from master_txn_table where product_service = \"Physical Therapy\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 8484, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Jessica Lee\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 8485, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Steven Phillips\" and transaction_type = 'invoice'" }, { "id": 8486, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Diana King\" and account_type in ('Expense','Other Expense') and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 8487, "SQL": "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,\"Child abuse prevention services\") and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 8488, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 8489, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Marcus Bartlett\" ) " }, { "id": 8490, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Elizabeth Curtis\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 8491, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Hydrogen\" " }, { "id": 8492, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 8493, "SQL": "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,\"Wood- and wood waste-fueled power generation\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 8494, "SQL": "select transaction_id from master_txn_table where product_service = \"Hydrogen\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 8495, "SQL": "select transaction_date from master_txn_table where customers = \"John Nunez\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 8496, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 8497, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Sheri Acevedo\"" }, { "id": 8498, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 8499, "SQL": "select transaction_date from master_txn_table where customers = \"Kelly Gillespie\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 8500, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kevin Suarez\" ) " }, { "id": 8501, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Stephanie Jennings\" and transaction_type = 'invoice'" }, { "id": 8502, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Susan Michael\" and transaction_type = 'invoice'" }, { "id": 8503, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kimberly Proctor\" ) " }, { "id": 8504, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 8505, "SQL": "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,\"Youth community center services\") and 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') " }, { "id": 8506, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Suzanne Gonzalez\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 8507, "SQL": "select transaction_date from master_txn_table where customers = \"Sally Barrett\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 8508, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Dana Snyder\" order by transaction_date limit 1" }, { "id": 8509, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Keith Park\" ) " }, { "id": 8510, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Frank Olson' or vendor = 'Frank Olson'" }, { "id": 8511, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Edward Ramsey\" ) " }, { "id": 8512, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jacqueline Schmitt MD\" and transaction_type = 'invoice'" }, { "id": 8513, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Kelsey Andrews\" order by transaction_date limit 1" }, { "id": 8514, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 8515, "SQL": "select transaction_date from master_txn_table where customers = \"Charles Little\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 8516, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 8517, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Wendy Kelly\" ) " }, { "id": 8518, "SQL": "select transaction_date 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 = \"Shunting trailers\" order by transaction_date asc limit 1 " }, { "id": 8519, "SQL": "select transaction_id from master_txn_table where customers = \"Lawrence Smith\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 8520, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Equity long-only\" " }, { "id": 8521, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 8522, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Donald Brown\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 8523, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 8524, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 8525, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 8526, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"James Booker\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 8527, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jeffery Murray\" ) " }, { "id": 8528, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Angela Dixon\" ) " }, { "id": 8529, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Erica Barron\" ) " }, { "id": 8530, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 8531, "SQL": "select transaction_date 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 = \"Nonmetallic mineral ore\" order by transaction_date asc limit 1 " }, { "id": 8532, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Taxes & Licenses\") and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 8533, "SQL": "select transaction_date from master_txn_table where customers = \"Roger Peterson\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 8534, "SQL": "select sum(credit) from master_txn_table where product_service = \"Tournaments and Matches\" and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 8535, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"William Brown\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 8536, "SQL": "select transaction_id from master_txn_table where product_service = \"Marine Supplies\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 8537, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 8538, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Tyler Mays\" ) " }, { "id": 8539, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Cory Vazquez\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 8540, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 8541, "SQL": "select max(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 = \"Steven Briggs\" and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 8542, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 8543, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jeanette Macdonald\" ) " }, { "id": 8544, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Steven Snyder' or vendor = 'Steven Snyder'" }, { "id": 8545, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') group by billing_city" }, { "id": 8546, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 8547, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Melinda Jones\" ) " }, { "id": 8548, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Steven Wall\" order by transaction_date limit 1" }, { "id": 8549, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 8550, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ashley Huber\" ) " }, { "id": 8551, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Retailing stationary sofas/sofa-sleepers\") and 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') " }, { "id": 8552, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 8553, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Building Repairs\") and vendor = \"Joshua Fisher\"" }, { "id": 8554, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Darryl Powell\" and transaction_type = 'invoice'" }, { "id": 8555, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Veronica Bean\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') )" }, { "id": 8556, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') order by sum(debit) desc limit 1" }, { "id": 8557, "SQL": "select min(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 = \"Jeanette Campbell\" and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 8558, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Stephanie Singh\" order by transaction_date limit 1" }, { "id": 8559, "SQL": "select transaction_id from master_txn_table where product_service = \"Environmental impact assessment\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 8560, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Michael Gill\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 8561, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Jasmine Hall\"" }, { "id": 8562, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jacqueline Mills\" ) " }, { "id": 8563, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 8564, "SQL": "select transaction_date from master_txn_table where customers = \"Nicole Burke\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 8565, "SQL": "select sum(credit) from master_txn_table where product_service = \"Organic Gases\" and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 8566, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Perforating well casings\") and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 8567, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Courtney Wagner\" ) " }, { "id": 8568, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Kelly Nolan\" order by transaction_date limit 1" }, { "id": 8569, "SQL": "select transaction_id from master_txn_table where customers = \"Dana Thompson\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 8570, "SQL": "select transaction_date from master_txn_table where customers = \"Monica Martin\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 8571, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 8572, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 8573, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Natasha Brown\" and transaction_type = 'payment' and 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') )" }, { "id": 8574, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Constructing townhouses\") and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 8575, "SQL": "select transaction_date 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 = \"Orange oil\" order by transaction_date asc limit 1 " }, { "id": 8576, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kari Cooper\" ) " }, { "id": 8577, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Tina White\" ) " }, { "id": 8578, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 8579, "SQL": "select product_service, 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 transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') group by product_service order by sum(credit) desc limit 1" }, { "id": 8580, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Kenneth Moody MD\"" }, { "id": 8581, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 8582, "SQL": "select transaction_id from master_txn_table where product_service = \"Coal\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 8583, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 8584, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Scott Jackson\" ) " }, { "id": 8585, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Garrett Martin\" ) " }, { "id": 8586, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Samantha Hill\" ) " }, { "id": 8587, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kelly Harper\" ) " }, { "id": 8588, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Steven Lawrence\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 8589, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Laura Johnson\" ) " }, { "id": 8590, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 8591, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Rebecca Pittman\" and transaction_type = 'invoice'" }, { "id": 8592, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") and account_type in ('Expense','Other Expense') " }, { "id": 8593, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 8594, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Jennifer Wright\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 8595, "SQL": "select transaction_date from master_txn_table where customers = \"Nicholas Washington\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 8596, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Billy Thompson\" ) " }, { "id": 8597, "SQL": "select transaction_date from master_txn_table where customers = \"Jessica Wilcox\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 8598, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Constructing duplexes\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 8599, "SQL": "select sum(credit) from master_txn_table where product_service = \"Flowers\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 8600, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Jill Jackson' or vendor = 'Jill Jackson'" }, { "id": 8601, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 8602, "SQL": "select transaction_date from master_txn_table where customers = \"Dana Knight\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 8603, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Amber Mcgee\" ) " }, { "id": 8604, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Janet Tyler\" ) " }, { "id": 8605, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Blueprinting services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 8606, "SQL": "select transaction_date from master_txn_table where customers = \"Michele Pace\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 8607, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kimberly Mills\" ) " }, { "id": 8608, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') order by sum(debit) desc limit 1" }, { "id": 8609, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"David Grant\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 8610, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 8611, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Sharon Maynard\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 8612, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Cheryl Bush\" ) " }, { "id": 8613, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 8614, "SQL": "select transaction_date from master_txn_table where customers = \"Rebecca Ramsey\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 8615, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 8616, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 8617, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Dues & Subscriptions\") and vendor = \"Robert Rodriguez MD\"" }, { "id": 8618, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Deanna Cervantes\" ) " }, { "id": 8619, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Timothy Richardson\" ) " }, { "id": 8620, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 8621, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Business management\" " }, { "id": 8622, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Zachary Kennedy\" ) " }, { "id": 8623, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Nathan Chavez\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 8624, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Katherine Hart\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 8625, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 8626, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and 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') " }, { "id": 8627, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and 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') order by sum(debit) desc limit 1" }, { "id": 8628, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 8629, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brandon Reed\" ) " }, { "id": 8630, "SQL": "select transaction_date from master_txn_table where customers = \"Jennifer Blair\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 8631, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Abandoned infant assistance\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 8632, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Providing homemaker and companion services\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 8633, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Providing freight car cleaning services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 8634, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Sean Rodriguez' or vendor = 'Sean Rodriguez'" }, { "id": 8635, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Daniel Phillips\" ) " }, { "id": 8636, "SQL": "select transaction_date from master_txn_table where customers = \"Tanner Flores\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 8637, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Non-renewable\" " }, { "id": 8638, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Richard Wolfe\" ) " }, { "id": 8639, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Charles Gonzalez\"" }, { "id": 8640, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Stephanie Lopez\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 8641, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Peter Gates\" ) " }, { "id": 8642, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 8643, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Kristen Flores\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 8644, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 8645, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Sydney Lynch' or vendor = 'Sydney Lynch'" }, { "id": 8646, "SQL": "select transaction_id from master_txn_table where product_service = \"Mobile Device\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 8647, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Child guidance services\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 8648, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Joshua Bartlett\" ) " }, { "id": 8649, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 8650, "SQL": "select transaction_date from master_txn_table where customers = \"Andrea Burnett\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 8651, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 8652, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Frederick Ramirez\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) ) " }, { "id": 8653, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Matthew Garcia\"" }, { "id": 8654, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Adam Gomez\" ) " }, { "id": 8655, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Duplexes\" " }, { "id": 8656, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Carrie Wilson\" ) " }, { "id": 8657, "SQL": "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,\"Accounting\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 8658, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Railroad Cars\" " }, { "id": 8659, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Steven Jackson\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 8660, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Bowling equipment and supply retailing\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 8661, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Michael Allen\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 8662, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Richard Wolfe\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) )" }, { "id": 8663, "SQL": "select sum(credit) from master_txn_table where product_service = \"Equity Market Neutral\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 8664, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 8665, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 8666, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Wendy Ball\" ) " }, { "id": 8667, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 8668, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Clinton Perez\" and transaction_type = 'invoice'" }, { "id": 8669, "SQL": "select transaction_date from master_txn_table where customers = \"Kimberly Carroll\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 8670, "SQL": "select transaction_id from master_txn_table where customers = \"Steven Sutton\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 8671, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 8672, "SQL": "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,\"Carbon dioxide manufacturing\") and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 8673, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Rachel Nguyen\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 8674, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Fast food restaurants\") and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 8675, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Dominique Ellis\" ) " }, { "id": 8676, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Michael Duke\" ) " }, { "id": 8677, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Jacob Mcgee\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) ) " }, { "id": 8678, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Bicycle retailing\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 8679, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kevin Ruiz\" ) " }, { "id": 8680, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Karen Berry\" and transaction_type = 'invoice'" }, { "id": 8681, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ryan Wiley\" ) " }, { "id": 8682, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 8683, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Timothy Estes\" ) " }, { "id": 8684, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 8685, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Matthew Price\"" }, { "id": 8686, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Intravenous therapy\") and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 8687, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Donald Rhodes\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') ) " }, { "id": 8688, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 8689, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Data entry services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 8690, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 8691, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Maurice Williams\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 8692, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 8693, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 8694, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Steven Hodges\" and account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 8695, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Equity long-only\" " }, { "id": 8696, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Joseph Jackson' or vendor = 'Joseph Jackson'" }, { "id": 8697, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Marc Hoffman\" order by transaction_date limit 1" }, { "id": 8698, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Mark Walls\" ) " }, { "id": 8699, "SQL": "select sum(credit) from master_txn_table where product_service = \"Housing\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 8700, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Angel Lewis\" ) " }, { "id": 8701, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 8702, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jessica Perez\" ) " }, { "id": 8703, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Michael Jimenez\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 8704, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Beth Jones\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 8705, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 8706, "SQL": "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,\"Medical services\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 8707, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Zachary Russell\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") )" }, { "id": 8708, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Daily living assistance\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 8709, "SQL": "select transaction_date 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 = \"Business courses\" order by transaction_date asc limit 1 " }, { "id": 8710, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Nathaniel Donaldson\" ) " }, { "id": 8711, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 8712, "SQL": "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,\"Retailing bedding\") and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 8713, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 8714, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Cementing wells\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 8715, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Allison Russell' or vendor = 'Allison Russell'" }, { "id": 8716, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') group by billing_city" }, { "id": 8717, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Michael Mata\" ) " }, { "id": 8718, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') group by billing_city" }, { "id": 8719, "SQL": "select transaction_date from master_txn_table where customers = \"Gabriella Gonzalez\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 8720, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') order by sum(debit) desc limit 1" }, { "id": 8721, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Jessica Wagner\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 8722, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 8723, "SQL": "select transaction_date 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 = \"Mailbox Services\" order by transaction_date asc limit 1 " }, { "id": 8724, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Stationery & Printing\") and vendor = \"Corey Liu\"" }, { "id": 8725, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Document copying services\") and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 8726, "SQL": "select max(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 = \"Paul Newman\" and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 8727, "SQL": "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 railroad equipment and supplies\") and 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') " }, { "id": 8728, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Barbara Ramos\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) )" }, { "id": 8729, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Transportation\" " }, { "id": 8730, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jonathan Carpenter\" ) " }, { "id": 8731, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Elizabeth Potter\" order by transaction_date limit 1" }, { "id": 8732, "SQL": "select transaction_date from master_txn_table where customers = \"Lori Petersen\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 8733, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Providing financing related to securities\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 8734, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Vanessa Freeman\" and transaction_type = 'invoice'" }, { "id": 8735, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 8736, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 8737, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Anna Briggs\" order by transaction_date limit 1" }, { "id": 8738, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' 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') " }, { "id": 8739, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') group by billing_city" }, { "id": 8740, "SQL": "select transaction_date from master_txn_table where customers = \"Jose Zavala\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 8741, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jessica Goodman\" ) " }, { "id": 8742, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Other food services\") and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 8743, "SQL": "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 engines and parts\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 8744, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Richard Johnson\" and account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 8745, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Marisa Mitchell\" ) " }, { "id": 8746, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 8747, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Offering equity long bias\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 8748, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Vanessa Phillips\" ) " }, { "id": 8749, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Alicia Daniels\" and transaction_type = 'invoice'" }, { "id": 8750, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 8751, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Scott Ballard\" order by transaction_date limit 1" }, { "id": 8752, "SQL": "select transaction_id from master_txn_table where customers = \"Mark Sanchez\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 8753, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"William Weber\" ) " }, { "id": 8754, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 8755, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by billing_city" }, { "id": 8756, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Mark Sexton\"" }, { "id": 8757, "SQL": "select transaction_id from master_txn_table where product_service = \"Basic Skills Training\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 8758, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Mark Kelly\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) ) " }, { "id": 8759, "SQL": "select transaction_id from master_txn_table where product_service = \"attached and detached units\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 8760, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Linda Sawyer\"" }, { "id": 8761, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Andrew Rogers\" and account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 8762, "SQL": "select transaction_date from master_txn_table where customers = \"Jane Saunders\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 8763, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 8764, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Taylor Kelley\" ) " }, { "id": 8765, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Daniel Moran\" ) " }, { "id": 8766, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Doris Goodman\" ) " }, { "id": 8767, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Artificial Intelligence Courses\") and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 8768, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Aaron Castillo\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) )" }, { "id": 8769, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Barbara Clark\"" }, { "id": 8770, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Attire and accessories\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 8771, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 8772, "SQL": "select transaction_id from master_txn_table where customers = \"Martin Osborne\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 8773, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Darren Schmidt' or vendor = 'Darren Schmidt'" }, { "id": 8774, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Kylie Acevedo\" order by transaction_date limit 1" }, { "id": 8775, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by billing_city" }, { "id": 8776, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brett Parsons\" ) " }, { "id": 8777, "SQL": "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,\"Ethical Hacking Training\") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 8778, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Susan Sanchez\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 8779, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Caleb Gomez\" ) " }, { "id": 8780, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 8781, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Eric Armstrong\" ) " }, { "id": 8782, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Coal Pwer\" " }, { "id": 8783, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 8784, "SQL": "select transaction_id from master_txn_table where customers = \"Patricia Hernandez\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 8785, "SQL": "select transaction_date 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 = \"Casino Hotels\" order by transaction_date asc limit 1 " }, { "id": 8786, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Fernando Barker\" ) " }, { "id": 8787, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 8788, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Destiny Smith' or vendor = 'Destiny Smith'" }, { "id": 8789, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Alexandra Miller\"" }, { "id": 8790, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Manufacturing grapefruit oil\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 8791, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Eric Trevino\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 8792, "SQL": "select transaction_date 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 = \"Barge\" order by transaction_date asc limit 1 " }, { "id": 8793, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 8794, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Scott Shaw\" ) " }, { "id": 8795, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 8796, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Marissa Peterson\" ) " }, { "id": 8797, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 8798, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"David Ortega\"" }, { "id": 8799, "SQL": "select transaction_id from master_txn_table where product_service = \"Shunting trailers\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 8800, "SQL": "select sum(credit) from master_txn_table where product_service = \"Appearances and speeches\" and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 8801, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Joshua Turner\" ) " }, { "id": 8802, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Robert Evans\" ) " }, { "id": 8803, "SQL": "select transaction_date 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 = \"Boat\" order by transaction_date asc limit 1 " }, { "id": 8804, "SQL": "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\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 8805, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 8806, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)group by product_service order by sum(credit) desc limit 1" }, { "id": 8807, "SQL": "select min(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 = \"Jorge Moore\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 8808, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Elaine Guzman\" ) " }, { "id": 8809, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 8810, "SQL": "select transaction_id from master_txn_table where customers = \"Tiffany Gomez\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 8811, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Wendy Green\" ) " }, { "id": 8812, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Dana Clark\" ) " }, { "id": 8813, "SQL": "select transaction_date 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 = \"Providing other outdoor maintenance services\" order by transaction_date asc limit 1 " }, { "id": 8814, "SQL": "select sum(credit) from master_txn_table where product_service = \"Towboat\" and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 8815, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 8816, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"David Vaughn\" ) " }, { "id": 8817, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 8818, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 8819, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Gilbert Nelson\" ) " }, { "id": 8820, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Tom Martinez\" order by transaction_date limit 1" }, { "id": 8821, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Kelly Carter\"" }, { "id": 8822, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 8823, "SQL": "select transaction_id from master_txn_table where customers = \"Joel Sanchez\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 8824, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 8825, "SQL": "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,\"Promotional\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 8826, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') and account_type in ('Expense','Other Expense') " }, { "id": 8827, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Dorothy Townsend\" and transaction_type = 'invoice'" }, { "id": 8828, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by billing_city" }, { "id": 8829, "SQL": "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,\"Repair & Maintenance (deleted)\") and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 8830, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Deborah Boyd\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 8831, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') and account_type in ('Expense','Other Expense') " }, { "id": 8832, "SQL": "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,\"Bookkeeper\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 8833, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 8834, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Rachael Johnson\" ) " }, { "id": 8835, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Youth guidance services\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 8836, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 8837, "SQL": "select transaction_id from master_txn_table where customers = \"Laura Roman\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 8838, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Abandoned infant assistance\") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 8839, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 8840, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Elizabeth Rodriguez\" ) " }, { "id": 8841, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Luis Reyes\" ) " }, { "id": 8842, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lindsay Elliott\" ) " }, { "id": 8843, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Railcar rental or leasing\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 8844, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Casey Church\" and transaction_type = 'invoice'" }, { "id": 8845, "SQL": "select transaction_date from master_txn_table where customers = \"Jordan Paul\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 8846, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Mark White\" and account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 8847, "SQL": "select transaction_date from master_txn_table where customers = \"Jeremy Huang\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 8848, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Wind Power generation\") and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 8849, "SQL": "select transaction_id from master_txn_table where customers = \"Ethan Williams\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 8850, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Laurie Marshall\" ) " }, { "id": 8851, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Medication\" " }, { "id": 8852, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Courtney Thompson\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 8853, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 8854, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") and account_type in ('Expense','Other Expense') " }, { "id": 8855, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kathryn Sullivan\" ) " }, { "id": 8856, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Matthew Hayes\" order by transaction_date limit 1" }, { "id": 8857, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Joshua Hunt\"" }, { "id": 8858, "SQL": "select sum(credit) from master_txn_table where product_service = \"Golf Courses\" and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 8859, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 8860, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jennifer Patterson\" order by transaction_date limit 1" }, { "id": 8861, "SQL": "select transaction_id from master_txn_table where customers = \"Scott Rodriguez\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 8862, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') and account_type in ('Expense','Other Expense') " }, { "id": 8863, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Cody Walker\"" }, { "id": 8864, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Manuel Powell\" ) " }, { "id": 8865, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Coal\" " }, { "id": 8866, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 8867, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Edward Walls\" ) " }, { "id": 8868, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Patricia Reid\" ) " }, { "id": 8869, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 8870, "SQL": "select transaction_id from master_txn_table where product_service = \"Copying\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 8871, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Kendra Miller\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 8872, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') order by sum(debit) desc limit 1" }, { "id": 8873, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Veronica Huffman\" ) " }, { "id": 8874, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Dalton Cook\" ) " }, { "id": 8875, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Crystal Joseph' or vendor = 'Crystal Joseph'" }, { "id": 8876, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Sarah Manning' or vendor = 'Sarah Manning'" }, { "id": 8877, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 8878, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Sarah Jackson\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 8879, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 8880, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Vanessa Garcia MD\" ) " }, { "id": 8881, "SQL": "select transaction_date from master_txn_table where customers = \"Karen Mccall\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 8882, "SQL": "select avg(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 = \"Matthew Duran\" and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 8883, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 8884, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounting\") and vendor = \"Eric Brooks\"" }, { "id": 8885, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Rachel Pruitt\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") ) " }, { "id": 8886, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 8887, "SQL": "select sum(credit) from master_txn_table where product_service = \"Steno class\" and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 8888, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 8889, "SQL": "select product_service, 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 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') group by product_service order by sum(credit) desc limit 1" }, { "id": 8890, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Kim Stout\" order by transaction_date limit 1" }, { "id": 8891, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Bradley Carter\"" }, { "id": 8892, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Nicole Conner' or vendor = 'Nicole Conner'" }, { "id": 8893, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Cory Pierce\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 8894, "SQL": "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,\"Acetylene manufacturing\") and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 8895, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Design and management services\") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 8896, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 8897, "SQL": "select transaction_date from master_txn_table where customers = \"Victoria Landry\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 8898, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 8899, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Baby furniture\") and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 8900, "SQL": "select transaction_id from master_txn_table where product_service = \"Meal\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 8901, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Gary Maldonado\" ) " }, { "id": 8902, "SQL": "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,\"Recognition software for IT and telecommunications\") and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 8903, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Travis Armstrong\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) ) " }, { "id": 8904, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Brandon Rodriguez\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 8905, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 8906, "SQL": "select transaction_id from master_txn_table where customers = \"Caroline Stephens\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 8907, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Eugene Brown\" ) " }, { "id": 8908, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Isabella Richardson\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 8909, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Shannon Miller\" ) " }, { "id": 8910, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 8911, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Yvonne Williams\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) )" }, { "id": 8912, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"James Carlson\" order by transaction_date limit 1" }, { "id": 8913, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 8914, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") group by billing_city" }, { "id": 8915, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 8916, "SQL": "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,\"Children and youth recreational programs\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 8917, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"David Benson\"" }, { "id": 8918, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jennifer Becker\" ) " }, { "id": 8919, "SQL": "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,\"Unapplied Cash Payment Income\") and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 8920, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Katherine Fitzpatrick\" ) " }, { "id": 8921, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Recognition software for healthcare\") and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 8922, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Melissa Parks\"" }, { "id": 8923, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') order by sum(debit) desc limit 1" }, { "id": 8924, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jennifer Watkins\" ) " }, { "id": 8925, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 8926, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Teen outreach services\") and 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') " }, { "id": 8927, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Taxes & Licenses\") and vendor = \"Warren Armstrong\"" }, { "id": 8928, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"David Torres\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 8929, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 8930, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 8931, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 8932, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Barbara Stone\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) ) " }, { "id": 8933, "SQL": "select sum(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Golf\" " }, { "id": 8934, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 8935, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 8936, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Medical services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 8937, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Andrea Saunders\"" }, { "id": 8938, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kari Cooper\" ) " }, { "id": 8939, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 8940, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 8941, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Leah Peterson\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 8942, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Travis Williams\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 8943, "SQL": "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,\"Photocopying services\") and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 8944, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 8945, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Yvonne Gilbert\" ) " }, { "id": 8946, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') order by sum(debit) desc limit 1" }, { "id": 8947, "SQL": "select transaction_id from master_txn_table where customers = \"Brian Gilmore\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 8948, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Jordan Fowler\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 8949, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Connor Roth\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 8950, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 8951, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Shannon Heath\" ) " }, { "id": 8952, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Joshua Bell\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date) AND date(current_date) ) " }, { "id": 8953, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 8954, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 8955, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Recognition software for IT and telecommunications\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 8956, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Ryan Waters\" and transaction_type = 'invoice'" }, { "id": 8957, "SQL": "select transaction_date from master_txn_table where customers = \"Lisa Lindsey\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 8958, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 8959, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Assessing product problems\" " }, { "id": 8960, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 8961, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Perforating well casings\") and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 8962, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jordan Green\" ) " }, { "id": 8963, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 8964, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jon Acevedo\" order by transaction_date limit 1" }, { "id": 8965, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') and account_type in ('Expense','Other Expense') " }, { "id": 8966, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 8967, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"James Dunn\" ) " }, { "id": 8968, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 8969, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') 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') order by sum(debit) desc limit 1" }, { "id": 8970, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 8971, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 8972, "SQL": "select transaction_id from master_txn_table where product_service = \"Toys\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 8973, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Kaitlyn Hodges\" order by transaction_date limit 1" }, { "id": 8974, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 8975, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 8976, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Decks and Patios\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 8977, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Samantha Berry\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 8978, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Jennifer Castro\" and account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 8979, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 8980, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 8981, "SQL": "select transaction_id from master_txn_table where product_service = \"Heavy construction equipment\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 8982, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Ronald Foley\" and transaction_type = 'payment' and 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') ) " }, { "id": 8983, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Tracy Daniels\" ) " }, { "id": 8984, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Services\" " }, { "id": 8985, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Quality management assessment\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 8986, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 8987, "SQL": "select transaction_id from master_txn_table where product_service = \"Homemaker and companion\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 8988, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 8989, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') group by product_service order by sum(credit) desc limit 1" }, { "id": 8990, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Anthony Ramos\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') ) " }, { "id": 8991, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 8992, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 8993, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Vanessa Snyder\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 8994, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Sean Wade DDS\" and transaction_type = 'payment' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') ) " }, { "id": 8995, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Krista Ross\"" }, { "id": 8996, "SQL": "select transaction_date 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 = \"Traveller accomodation\" order by transaction_date asc limit 1 " }, { "id": 8997, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Mary Cline\" order by transaction_date limit 1" }, { "id": 8998, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 8999, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name 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 account_type in ('Expense','Other Expense') " }, { "id": 9000, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jeffrey Mooney\" ) " }, { "id": 9001, "SQL": "select transaction_date 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 = \"Attire and accessories\" order by transaction_date asc limit 1 " }, { "id": 9002, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Telephone\") and vendor = \"Katherine Wilkinson\"" }, { "id": 9003, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sarah Lopez\" ) " }, { "id": 9004, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Amanda Johnston\" ) " }, { "id": 9005, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Dorothy Hughes\" ) " }, { "id": 9006, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 9007, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') order by sum(debit) desc limit 1" }, { "id": 9008, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kayla Wright\" ) " }, { "id": 9009, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Thomas Ayers\" ) " }, { "id": 9010, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Benjamin Carter\" and transaction_type = 'invoice'" }, { "id": 9011, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Zachary Warren\" ) " }, { "id": 9012, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 9013, "SQL": "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,\"Exercise equipment retailing\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 9014, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Andrea Mullins\" ) " }, { "id": 9015, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 9016, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 9017, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"George Knox\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') )" }, { "id": 9018, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Manufacturing other essential oils\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 9019, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Terry Manning\" and transaction_type = 'invoice'" }, { "id": 9020, "SQL": "select transaction_id from master_txn_table where product_service = \"Toys\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 9021, "SQL": "select product_service, 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 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') group by product_service order by sum(credit) desc limit 1" }, { "id": 9022, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Crystal Spencer\" ) " }, { "id": 9023, "SQL": "select transaction_date from master_txn_table where customers = \"Bethany Rosario\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 9024, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 9025, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 9026, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') group by product_service order by sum(credit) desc limit 1" }, { "id": 9027, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Dana Obrien\" ) " }, { "id": 9028, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') group by billing_city" }, { "id": 9029, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Boat, ship and steamship rental or leasing\") and 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') " }, { "id": 9030, "SQL": "select transaction_date 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 = \"Games\" order by transaction_date asc limit 1 " }, { "id": 9031, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Amy Robles MD' or vendor = 'Amy Robles MD'" }, { "id": 9032, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 9033, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') order by sum(debit) desc limit 1" }, { "id": 9034, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Steve Watts\" ) " }, { "id": 9035, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Providing grain leveling and trimming in railroad cars\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 9036, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Brandy Gates\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 9037, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Scott Garza\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 9038, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Brian Carter' or vendor = 'Brian Carter'" }, { "id": 9039, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 9040, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Tara Quinn\" order by transaction_date limit 1" }, { "id": 9041, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Paul Torres\" ) " }, { "id": 9042, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"John Vega\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 9043, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Web hosting\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 9044, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') group by billing_city" }, { "id": 9045, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Kendra Evans\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) ) " }, { "id": 9046, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Maria Flores\"" }, { "id": 9047, "SQL": "select transaction_date 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 = \"Medical services\" order by transaction_date asc limit 1 " }, { "id": 9048, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Christopher Adams DDS\" ) " }, { "id": 9049, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Steven Buckley\" ) " }, { "id": 9050, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sierra Morrow DVM\" ) " }, { "id": 9051, "SQL": "select transaction_date from master_txn_table where customers = \"Lori Collins\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 9052, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Marcus Hawkins\" ) " }, { "id": 9053, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Sheila Russell\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 9054, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Providing loading and unloading services at rail terminals\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 9055, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Robert Higgins\" ) " }, { "id": 9056, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 9057, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 9058, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 9059, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Miscellaneous services\") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 9060, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 9061, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Travel Meals\") and vendor = \"Victoria Smith\"" }, { "id": 9062, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Providing 24-hour home care\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 9063, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Jacqueline Chambers\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 9064, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 9065, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 9066, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Brian Bailey\" and transaction_type = 'invoice'" }, { "id": 9067, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 9068, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 9069, "SQL": "select sum(credit) from master_txn_table where product_service = \"Boarding\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 9070, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jody Sanchez\" ) " }, { "id": 9071, "SQL": "select product_service, 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 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') group by product_service order by sum(credit) desc limit 1" }, { "id": 9072, "SQL": "select transaction_id from master_txn_table where product_service = \"Macro\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 9073, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Victoria Stanley\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 9074, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Nicholas Welch\" ) " }, { "id": 9075, "SQL": "select min(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 = \"Mark Thompson\" and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 9076, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 9077, "SQL": "select transaction_date from master_txn_table where customers = \"Barry Mcgee\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 9078, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Anna Lewis\"" }, { "id": 9079, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 9080, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Ian Meadows\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 9081, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Julie Anderson DDS\" ) " }, { "id": 9082, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Sheila Morgan\" order by transaction_date limit 1" }, { "id": 9083, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Daniel Durham\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 9084, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by billing_city" }, { "id": 9085, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Emily Butler\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) ) " }, { "id": 9086, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Whitney Watts\" ) " }, { "id": 9087, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Anna Lewis\"" }, { "id": 9088, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 9089, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Kimberly Knapp\" and transaction_type = 'invoice'" }, { "id": 9090, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 9091, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jessica Fletcher\" ) " }, { "id": 9092, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Michael Nguyen\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 9093, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Rental Services\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 9094, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"George Dalton\" ) " }, { "id": 9095, "SQL": "select avg(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 = \"Keith Ward\" and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 9096, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Kristina Berry\"" }, { "id": 9097, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Henry Diaz\" and account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 9098, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Jaime Quinn' or vendor = 'Jaime Quinn'" }, { "id": 9099, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Tony Gonzalez\" ) " }, { "id": 9100, "SQL": "select min(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 = \"Jody Petersen\" and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 9101, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 9102, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Sara Meza\" order by transaction_date limit 1" }, { "id": 9103, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 9104, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Natalie Hopkins\" order by transaction_date limit 1" }, { "id": 9105, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Constructing townhouses\") and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 9106, "SQL": "select transaction_date 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 = \"Nonfossil-fuel\" order by transaction_date asc limit 1 " }, { "id": 9107, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Corey Liu\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 9108, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Mackenzie Fernandez\" ) " }, { "id": 9109, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Retailing home office furniture\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 9110, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Permits\") and vendor = \"Gary Mccoy\"" }, { "id": 9111, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 9112, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Courtney Contreras\"" }, { "id": 9113, "SQL": "select transaction_id from master_txn_table where product_service = \"Forestry Machinery\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 9114, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 9115, "SQL": "select avg(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 = \"Erik Cobb\" and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 9116, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 9117, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Jesus Best' or vendor = 'Jesus Best'" }, { "id": 9118, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 9119, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Raymond Humphrey\" ) " }, { "id": 9120, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Krystal Soto' or vendor = 'Krystal Soto'" }, { "id": 9121, "SQL": "select sum(credit) from master_txn_table where product_service = \"Packing\" 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') " }, { "id": 9122, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Frederick Hudson\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 9123, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'James Parsons' or vendor = 'James Parsons'" }, { "id": 9124, "SQL": "select min(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 = \"Tony Fitzgerald\" and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 9125, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 9126, "SQL": "select min(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 = \"Hannah Yates\" and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 9127, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Joseph Wilson\" and transaction_type = 'payment' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') ) " }, { "id": 9128, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Natasha Adkins\" ) " }, { "id": 9129, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 9130, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Matthew Turner\" order by transaction_date limit 1" }, { "id": 9131, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Casino Hotels\" " }, { "id": 9132, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Peter Padilla IV\" ) " }, { "id": 9133, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Home-care Service\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 9134, "SQL": "select avg(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 = \"David Hanson\" and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 9135, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Malik Byrd\"" }, { "id": 9136, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Stephen Beltran\" ) " }, { "id": 9137, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Linda Santos\" ) " }, { "id": 9138, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Clifford Brown\" ) " }, { "id": 9139, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 9140, "SQL": "select sum(credit) from master_txn_table where product_service = \"Project assessments\" and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 9141, "SQL": "select transaction_id from master_txn_table where product_service = \"Social\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 9142, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Mitchell Jones\" ) " }, { "id": 9143, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Pamela Holloway\" and transaction_type = 'invoice'" }, { "id": 9144, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Elizabeth Odom\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 9145, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Annette Moore\" ) " }, { "id": 9146, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Raymond Hooper\" ) " }, { "id": 9147, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Mark Irwin\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) )" }, { "id": 9148, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Manufacturing citronella oil\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 9149, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Daniel Patrick\" ) " }, { "id": 9150, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Gregory Grant\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 9151, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lance Whitehead\" ) " }, { "id": 9152, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Ashley Mccormick\"" }, { "id": 9153, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 9154, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jennifer Chapman\"" }, { "id": 9155, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Elizabeth Padilla\" ) " }, { "id": 9156, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kimberly Jackson\" ) " }, { "id": 9157, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 9158, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jeffrey Graham\" ) " }, { "id": 9159, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 9160, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 9161, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 9162, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Amy Mcclure\"" }, { "id": 9163, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 9164, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Sherri Turner\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 9165, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 9166, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 9167, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Francisco Rhodes\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") ) " }, { "id": 9168, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Patricia Gallagher\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) ) " }, { "id": 9169, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Sandra Duncan\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 9170, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Debra West\" order by transaction_date limit 1" }, { "id": 9171, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Danny Elliott\" ) " }, { "id": 9172, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lisa Calderon\" ) " }, { "id": 9173, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lorraine Russo\" ) " }, { "id": 9174, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 9175, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Phillip Rogers\" ) " }, { "id": 9176, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 9177, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') order by sum(debit) desc limit 1" }, { "id": 9178, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Gary Flores\"" }, { "id": 9179, "SQL": "select sum(credit) from master_txn_table where product_service = \"Wardrobe\" and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 9180, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 9181, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kelly Bauer\" ) " }, { "id": 9182, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Melissa Bird' or vendor = 'Melissa Bird'" }, { "id": 9183, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Mitchell Roberts\"" }, { "id": 9184, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 9185, "SQL": "select transaction_id from master_txn_table where product_service = \"Diapers\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 9186, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by billing_city" }, { "id": 9187, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 9188, "SQL": "select transaction_id from master_txn_table where product_service = \"Casings, Tubes and Rods\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 9189, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Patrick Martin\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 9190, "SQL": "select transaction_id from master_txn_table where product_service = \"Distressed Securities\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 9191, "SQL": "select sum(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Housing\" " }, { "id": 9192, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 9193, "SQL": "select transaction_date 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 = \"Railroad terminals\" order by transaction_date asc limit 1 " }, { "id": 9194, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 9195, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name 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 account_type in ('Expense','Other Expense') " }, { "id": 9196, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') and account_type in ('Expense','Other Expense') " }, { "id": 9197, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Ashley Golden\" order by transaction_date limit 1" }, { "id": 9198, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Charles Berger\" ) " }, { "id": 9199, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 9200, "SQL": "select transaction_date from master_txn_table where customers = \"Alan Gross\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 9201, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Wendy Bennett\" and transaction_type = 'invoice'" }, { "id": 9202, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Emily Coleman\" ) " }, { "id": 9203, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 9204, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 9205, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Timothy Davis\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 9206, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Willie Reed\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 9207, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Telephone\") and vendor = \"Elizabeth Jones\"" }, { "id": 9208, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Rent or Lease\") and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 9209, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 9210, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 9211, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 9212, "SQL": "select transaction_id from master_txn_table where customers = \"Leslie Nelson\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 9213, "SQL": "select transaction_id from master_txn_table where customers = \"Ivan Newton\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 9214, "SQL": "select transaction_id from master_txn_table where customers = \"Javier Jordan\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 9215, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Joseph Richardson\" ) " }, { "id": 9216, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Robert Molina\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 9217, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Traci Zimmerman\" ) " }, { "id": 9218, "SQL": "select max(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 = \"Eric Mata\" and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 9219, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') 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') order by sum(debit) desc limit 1" }, { "id": 9220, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Amy Wheeler' or vendor = 'Amy Wheeler'" }, { "id": 9221, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Insurance\") and vendor = \"Patrick Dixon\"" }, { "id": 9222, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Bangalow\" " }, { "id": 9223, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Rick Brown\"" }, { "id": 9224, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 9225, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"David Simpson\" ) " }, { "id": 9226, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 9227, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') order by sum(debit) desc limit 1" }, { "id": 9228, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Gregory Lucas\" ) " }, { "id": 9229, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 9230, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 9231, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 9232, "SQL": "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,\"Quality management assessment\") and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 9233, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 9234, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jason Parker\" ) " }, { "id": 9235, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Natasha Brandt\" ) " }, { "id": 9236, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') 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') group by billing_city" }, { "id": 9237, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Matthew Barnes\" and transaction_type = 'invoice'" }, { "id": 9238, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 9239, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 9240, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Thomas Snyder\" and transaction_type = 'invoice'" }, { "id": 9241, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 9242, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jessica Keith\" order by transaction_date limit 1" }, { "id": 9243, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Eric Becker\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 9244, "SQL": "select transaction_date from master_txn_table where customers = \"Lindsey Wyatt\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 9245, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 9246, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kathleen Hamilton\" ) " }, { "id": 9247, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Wendy Graham\" order by transaction_date limit 1" }, { "id": 9248, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 9249, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Tyler Ramirez\" and transaction_type = 'invoice'" }, { "id": 9250, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Offering equity long bias\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 9251, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Patricia Norman\" order by transaction_date limit 1" }, { "id": 9252, "SQL": "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,\"Swimming pool Cleaning\") 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') " }, { "id": 9253, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Utilities\") and vendor = \"Shirley Padilla\"" }, { "id": 9254, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Nathan Morgan\" ) " }, { "id": 9255, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 9256, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 9257, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Permits\") and vendor = \"Kenneth Moody MD\"" }, { "id": 9258, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 9259, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Cindy Beasley\"" }, { "id": 9260, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name 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 account_type in ('Expense','Other Expense') " }, { "id": 9261, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Amy Rogers\" order by transaction_date limit 1" }, { "id": 9262, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 9263, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Golf Equipment\" " }, { "id": 9264, "SQL": "select avg(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 = \"Gary Chan\" and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 9265, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Kevin Mccormick\" order by transaction_date limit 1" }, { "id": 9266, "SQL": "select max(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 = \"Robert Clark\" and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 9267, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Barbara Harris\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 9268, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Document copying services\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 9269, "SQL": "select transaction_id from master_txn_table where customers = \"Andrea Grant\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 9270, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Data storage and management services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 9271, "SQL": "select transaction_id from master_txn_table where product_service = \"Railroad switching\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 9272, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Jeffrey Barton\"" }, { "id": 9273, "SQL": "select product_service, 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 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') group by product_service order by sum(credit) desc limit 1" }, { "id": 9274, "SQL": "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 support for money management\") and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 9275, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Patricia Gordon\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) ) " }, { "id": 9276, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jose Drake\" ) " }, { "id": 9277, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Street vending locations\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 9278, "SQL": "select transaction_date from master_txn_table where customers = \"Gail Bailey\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 9279, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Zachary Foster\" ) " }, { "id": 9280, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Andrea Gray\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 9281, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') 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') order by sum(debit) desc limit 1" }, { "id": 9282, "SQL": "select transaction_date 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 = \"Waste-fueled\" order by transaction_date asc limit 1 " }, { "id": 9283, "SQL": "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 engines and parts\") and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 9284, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Arthur Marsh' or vendor = 'Arthur Marsh'" }, { "id": 9285, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 9286, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 9287, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Yvette Davis\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) )" }, { "id": 9288, "SQL": "select max(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 = \"Joseph Freeman\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 9289, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 9290, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Nicholas Collins\" and transaction_type = 'invoice'" }, { "id": 9291, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 9292, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 9293, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 9294, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 9295, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Melanie Haynes\" ) " }, { "id": 9296, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Scott Cole\" ) " }, { "id": 9297, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 9298, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Dues & Subscriptions\") and vendor = \"Christopher Clark\"" }, { "id": 9299, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Maria Mason\" order by transaction_date limit 1" }, { "id": 9300, "SQL": "select transaction_id from master_txn_table where product_service = \"Leveling and Trimming\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 9301, "SQL": "select max(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 = \"Brett Jenkins\" and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 9302, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Constructing apartment complexes\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 9303, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Steven Riley\"" }, { "id": 9304, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 9305, "SQL": "select transaction_id from master_txn_table where customers = \"Charlotte Jackson\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 9306, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Vanessa Norris' or vendor = 'Vanessa Norris'" }, { "id": 9307, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') order by sum(debit) desc limit 1" }, { "id": 9308, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Offering equity long/short \") and 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') " }, { "id": 9309, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jeffrey Crawford\" ) " }, { "id": 9310, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ann Vega\" ) " }, { "id": 9311, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Lori Orozco\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) )" }, { "id": 9312, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 9313, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Cynthia Johnson\"" }, { "id": 9314, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 9315, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jon Russell\" and transaction_type = 'invoice'" }, { "id": 9316, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Brian Lopez\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 9317, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Christian Fernandez\"" }, { "id": 9318, "SQL": "select transaction_date from master_txn_table where customers = \"Brian Reynolds\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 9319, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') and account_type in ('Expense','Other Expense') " }, { "id": 9320, "SQL": "select transaction_id from master_txn_table where customers = \"Christina Pena\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 9321, "SQL": "select transaction_date 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 = \"Organic Gases\" order by transaction_date asc limit 1 " }, { "id": 9322, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Peppermint oil\" " }, { "id": 9323, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Scott Steele\" ) " }, { "id": 9324, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Kristen Richardson\" order by transaction_date limit 1" }, { "id": 9325, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Recognition software for the auto sector\") and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 9326, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Amanda Ewing\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 9327, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Pool maintenance\" " }, { "id": 9328, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Cory Moses\"" }, { "id": 9329, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Manufacturing other essential oils\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 9330, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Barbara White\" ) " }, { "id": 9331, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 9332, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Telephone\") and vendor = \"Patrick Sutton\"" }, { "id": 9333, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Clayton Warren\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) ) " }, { "id": 9334, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Natalie Ballard\" and transaction_type = 'invoice'" }, { "id": 9335, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Acidizing and chemically treating wells\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 9336, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Rhonda Meyers\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 9337, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Adam Tapia\" ) " }, { "id": 9338, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 9339, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jason Burke\" ) " }, { "id": 9340, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Christina Davis\" ) " }, { "id": 9341, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Katherine Juarez\" ) " }, { "id": 9342, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 9343, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Theresa Alvarez\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 9344, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Julie Irwin\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) )" }, { "id": 9345, "SQL": "select transaction_date from master_txn_table where customers = \"Frank Williams\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 9346, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Manufacturing spearmint oil\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 9347, "SQL": "select transaction_id from master_txn_table where product_service = \"Data entry\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 9348, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Erica Grant\"" }, { "id": 9349, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 9350, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Other non-renewable power generation\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 9351, "SQL": "select transaction_date 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 = \"PCs\" order by transaction_date asc limit 1 " }, { "id": 9352, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Kenneth Brown\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 9353, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Donald Keller\"" }, { "id": 9354, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 9355, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Cindy Morris\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 9356, "SQL": "select transaction_date 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\" order by transaction_date asc limit 1 " }, { "id": 9357, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date) AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 9358, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 9359, "SQL": "select sum(credit) from master_txn_table where product_service = \"Home care\" and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 9360, "SQL": "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,\"Recognition software for government and legal purposes\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 9361, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Linda Reeves\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 9362, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 9363, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Patty Shaw\" ) " }, { "id": 9364, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Richard Hurley\" ) " }, { "id": 9365, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') group by billing_city" }, { "id": 9366, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kylie Wheeler\" ) " }, { "id": 9367, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Computer operation training\") and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 9368, "SQL": "select transaction_id from master_txn_table where product_service = \"Life cycle asset management\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 9369, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Cynthia Hopkins\"" }, { "id": 9370, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 9371, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 9372, "SQL": "select transaction_id from master_txn_table where product_service = \"Bowling\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 9373, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brian Scott\" ) " }, { "id": 9374, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 9375, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 9376, "SQL": "select transaction_date from master_txn_table where customers = \"Samantha Weaver\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 9377, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Cheryl Calderon\"" }, { "id": 9378, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 9379, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Terry Rodriguez\"" }, { "id": 9380, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Melanie Jenkins\"" }, { "id": 9381, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"David Evans\" ) " }, { "id": 9382, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Douglas Myers\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 9383, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Timothy Lewis\"" }, { "id": 9384, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Terry Harris' or vendor = 'Terry Harris'" }, { "id": 9385, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 9386, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Peter Schmitt\" ) " }, { "id": 9387, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 9388, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Erin Duke\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') )" }, { "id": 9389, "SQL": "select transaction_id from master_txn_table where customers = \"Edward Fuller\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 9390, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Wayne Gonzales\" ) " }, { "id": 9391, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 9392, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date) AND date(current_date) group by billing_city" }, { "id": 9393, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 9394, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by billing_city" }, { "id": 9395, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Sleepers\" " }, { "id": 9396, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 9397, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 9398, "SQL": "select sum(credit) from master_txn_table where product_service = \"Duct and gutter cleaning\" and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 9399, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Cynthia Becker\" ) " }, { "id": 9400, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Peggy Martin\" order by transaction_date limit 1" }, { "id": 9401, "SQL": "select transaction_id from master_txn_table where product_service = \"Equity long/short\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 9402, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Stephen Morris\" ) " }, { "id": 9403, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kenneth Cox\" ) " }, { "id": 9404, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Tammy Frost\" order by transaction_date limit 1" }, { "id": 9405, "SQL": "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 accommodation services\") and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 9406, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 9407, "SQL": "select transaction_date from master_txn_table where customers = \"Michael Harper\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 9408, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Stacy Hoffman\" and account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 9409, "SQL": "select max(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 = \"Leon Hahn\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 9410, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Amber Howard\" ) " }, { "id": 9411, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Jorge Warren\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") )" }, { "id": 9412, "SQL": "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 freight car cleaning services\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 9413, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jeremy Knox\" and transaction_type = 'invoice'" }, { "id": 9414, "SQL": "select transaction_date 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 = \"Service Provisioning\" order by transaction_date asc limit 1 " }, { "id": 9415, "SQL": "select transaction_date from master_txn_table where customers = \"Jessica Wells\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 9416, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Mallory Smith\"" }, { "id": 9417, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Amber Webb\" ) " }, { "id": 9418, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Calvin Le\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 9419, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Hacking Training\" " }, { "id": 9420, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 9421, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Alexander Miller' or vendor = 'Alexander Miller'" }, { "id": 9422, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jeanette Macdonald\" and transaction_type = 'invoice'" }, { "id": 9423, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Cathy Miranda\"" }, { "id": 9424, "SQL": "select min(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 = \"Jordan Schmidt\" and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 9425, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") group by billing_city" }, { "id": 9426, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Automobile\") and vendor = \"Christopher Church\"" }, { "id": 9427, "SQL": "select product_service, 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 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') group by product_service order by sum(credit) desc limit 1" }, { "id": 9428, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 9429, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Mackenzie Howell\" and transaction_type = 'invoice'" }, { "id": 9430, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Promotional\") and vendor = \"John Edwards\"" }, { "id": 9431, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Ashley Nolan\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) )" }, { "id": 9432, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Hotels and motel services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 9433, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 9434, "SQL": "select min(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 = \"Robyn Freeman\" and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 9435, "SQL": "select max(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 = \"Randy Collins\" and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 9436, "SQL": "select transaction_id from master_txn_table where customers = \"Cindy Hall\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 9437, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 9438, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brett Pearson\" ) " }, { "id": 9439, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Tanya Robinson\" and transaction_type = 'payment' 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') )" }, { "id": 9440, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Surveying wells\") and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 9441, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 9442, "SQL": "select transaction_id from master_txn_table where customers = \"Jamie Fields\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 9443, "SQL": "select transaction_id from master_txn_table where product_service = \"Oxygen\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 9444, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 9445, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') and account_type in ('Expense','Other Expense') " }, { "id": 9446, "SQL": "select transaction_id from master_txn_table where product_service = \"Diving\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 9447, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Adam Rodgers\" ) " }, { "id": 9448, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"environmental projects\" " }, { "id": 9449, "SQL": "select sum(credit) from master_txn_table where product_service = \"Snow removal services\" and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 9450, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Diana Allison\"" }, { "id": 9451, "SQL": "select transaction_date from master_txn_table where customers = \"Christopher Rivera\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 9452, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Kayla Maldonado\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 9453, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Wind power\" " }, { "id": 9454, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Wind Power generation\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 9455, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Eileen Cox\" ) " }, { "id": 9456, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Ryan Mcdonald' or vendor = 'Ryan Mcdonald'" }, { "id": 9457, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Development of software products for automobiles\") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 9458, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Michael Chavez\"" }, { "id": 9459, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jeffrey Lindsey\" ) " }, { "id": 9460, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Other sporting goods retailing\") and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 9461, "SQL": "select transaction_id from master_txn_table where customers = \"James Blake\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 9462, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Linda Kennedy MD\" and transaction_type = 'payment' 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') )" }, { "id": 9463, "SQL": "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 trust and fiduciary services\") and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 9464, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jeffery Smith\" ) " }, { "id": 9465, "SQL": "select min(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 = \"Caitlin Cooper\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 9466, "SQL": "select transaction_id from master_txn_table where customers = \"Morgan Myers\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 9467, "SQL": "select transaction_id from master_txn_table where product_service = \"Towboat\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 9468, "SQL": "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 nonnuclear power generation\") and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 9469, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jason Barajas\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 9470, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brenda Peterson\" ) " }, { "id": 9471, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Travel\") and vendor = \"Douglas Nelson\"" }, { "id": 9472, "SQL": "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 classes in stenography and court reporting\") and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 9473, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Manufacturing peppermint oil\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 9474, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Samuel Acevedo\" ) " }, { "id": 9475, "SQL": "select sum(credit) from master_txn_table where product_service = \"Shearing\" and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 9476, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Jacqueline Brown' or vendor = 'Jacqueline Brown'" }, { "id": 9477, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Melissa Mccann\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 9478, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 9479, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Other accommodation services\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 9480, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Barbara Silva\" and transaction_type = 'payment' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') )" }, { "id": 9481, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 9482, "SQL": "select transaction_id from master_txn_table where customers = \"Vanessa Lopez\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 9483, "SQL": "select min(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 = \"Paul Juarez\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 9484, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Maintenance and Repairs\") and vendor = \"Kathryn Mccann\"" }, { "id": 9485, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Local area network management training\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 9486, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Jonathan Parker' or vendor = 'Jonathan Parker'" }, { "id": 9487, "SQL": "select transaction_date 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 = \"Apparel and shoes\" order by transaction_date asc limit 1 " }, { "id": 9488, "SQL": "select transaction_id from master_txn_table where product_service = \"Fluorocarbon gases\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 9489, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Megan Sanchez\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 9490, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Steve Fuller\" ) " }, { "id": 9491, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 9492, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 9493, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Darryl Hodges\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') ) " }, { "id": 9494, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Web hosting\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 9495, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Casey Smith\" ) " }, { "id": 9496, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Shelly Mccarty MD\" ) " }, { "id": 9497, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Patrick Ball\" and transaction_type = 'invoice'" }, { "id": 9498, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"John Manning\" ) " }, { "id": 9499, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Edwin Miller\" ) " }, { "id": 9500, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 9501, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Katrina Noble\" ) " }, { "id": 9502, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Christopher Williams\" ) " }, { "id": 9503, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Joshua Harris' or vendor = 'Joshua Harris'" }, { "id": 9504, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"James Carr\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 9505, "SQL": "select transaction_date from master_txn_table where customers = \"Nicholas Phillips\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 9506, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Job Expenses\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 9507, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Kyle Hooper\" order by transaction_date limit 1" }, { "id": 9508, "SQL": "select transaction_date 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 = \"Financial\" order by transaction_date asc limit 1 " }, { "id": 9509, "SQL": "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,\"Ventilation cleaning\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 9510, "SQL": "select transaction_date from master_txn_table where customers = \"Curtis Hunter\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 9511, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Jonathan Foley\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) )" }, { "id": 9512, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Golf Instructions\" " }, { "id": 9513, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 9514, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Diana King' or vendor = 'Diana King'" }, { "id": 9515, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 9516, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Shannon West\" ) " }, { "id": 9517, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 9518, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 9519, "SQL": "select sum(credit) from master_txn_table where product_service = \"Training\" and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 9520, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 9521, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Christine Andrews\" and transaction_type = 'payment' and 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') ) " }, { "id": 9522, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Alan Avila\" ) " }, { "id": 9523, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 9524, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Angel Cortez\" order by transaction_date limit 1" }, { "id": 9525, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Diana Adams\" ) " }, { "id": 9526, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Tamara Young\" ) " }, { "id": 9527, "SQL": "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 = \"Steven Lang\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 9528, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"William Fox\" ) " }, { "id": 9529, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Nitrogen manufacturing\") and 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') " }, { "id": 9530, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ian Brown\" ) " }, { "id": 9531, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Transportation services\") and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 9532, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Cheryl Garcia\" ) " }, { "id": 9533, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jamie Williams\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 9534, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Patrick Mcpherson\"" }, { "id": 9535, "SQL": "select transaction_id from master_txn_table where customers = \"Heather Carr DVM\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 9536, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Roger Vega\"" }, { "id": 9537, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"James Vargas\" ) " }, { "id": 9538, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Mary Ross\"" }, { "id": 9539, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Aaron Owens\"" }, { "id": 9540, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 9541, "SQL": "select transaction_date from master_txn_table where customers = \"Miss Brianna Carter\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 9542, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 9543, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Dillon Hall\" ) " }, { "id": 9544, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Miss Kimberly Carroll\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') ) " }, { "id": 9545, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') group by product_service order by sum(credit) desc limit 1" }, { "id": 9546, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Katherine Bolton\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 9547, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Baby strollers\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 9548, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Donna Watkins\" ) " }, { "id": 9549, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Purchases\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 9550, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Sara Khan\" and transaction_type = 'invoice'" }, { "id": 9551, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Providing shunting trailers in rail terminals\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 9552, "SQL": "select transaction_id from master_txn_table where product_service = \"Event-driven\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 9553, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Megan Adams\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) ) " }, { "id": 9554, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Joshua Dorsey\" ) " }, { "id": 9555, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Amy Paul\" ) " }, { "id": 9556, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Angela Clark\" order by transaction_date limit 1" }, { "id": 9557, "SQL": "select sum(credit) from master_txn_table where product_service = \"Equity long-only\" and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 9558, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Private parcel mailing centers\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 9559, "SQL": "select transaction_date from master_txn_table where customers = \"Christopher Cruz\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 9560, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 9561, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kathryn Ramirez\" ) " }, { "id": 9562, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Douglas Day\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) )" }, { "id": 9563, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Kenneth Dixon\" order by transaction_date limit 1" }, { "id": 9564, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Robert Rasmussen\" and account_type in ('Expense','Other Expense') 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') " }, { "id": 9565, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ryan Kelly\" ) " }, { "id": 9566, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 9567, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Megan Thomas' or vendor = 'Megan Thomas'" }, { "id": 9568, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 9569, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Samuel Durham\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) )" }, { "id": 9570, "SQL": "select transaction_date 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 = \"Medication\" order by transaction_date asc limit 1 " }, { "id": 9571, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Brian Webb\" order by transaction_date limit 1" }, { "id": 9572, "SQL": "select transaction_id from master_txn_table where product_service = \"Recreation\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 9573, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") order by sum(debit) desc limit 1" }, { "id": 9574, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Timothy Townsend\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 9575, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Shelby King\"" }, { "id": 9576, "SQL": "select transaction_date from master_txn_table where customers = \"Jacqueline Jackson DDS\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 9577, "SQL": "select sum(credit) from master_txn_table where product_service = \"Food\" and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 9578, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Morgan Harrington\" and transaction_type = 'payment' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') ) " }, { "id": 9579, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Rent or Lease\") and vendor = \"Jessica Baker\"" }, { "id": 9580, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"John Wolfe\" ) " }, { "id": 9581, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Travis Lewis' or vendor = 'Travis Lewis'" }, { "id": 9582, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date) AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 9583, "SQL": "select product_service, 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 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') group by product_service order by sum(credit) desc limit 1" }, { "id": 9584, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') group by billing_city" }, { "id": 9585, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 9586, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 9587, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Decks and Patios\") and vendor = \"David Lewis\"" }, { "id": 9588, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 9589, "SQL": "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,\"Baby accessories\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 9590, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 9591, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 9592, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Billable Expense Income\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 9593, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Sonya Williams\" and transaction_type = 'payment' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') )" }, { "id": 9594, "SQL": "select avg(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 = \"Melissa Lynn\" and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 9595, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 9596, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Thomas Bennett\" ) " }, { "id": 9597, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and 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') " }, { "id": 9598, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Dale Reyes\" order by transaction_date limit 1" }, { "id": 9599, "SQL": "select transaction_date from master_txn_table where customers = \"Emily Chandler\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 9600, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Tony Chen\"" }, { "id": 9601, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 9602, "SQL": "select min(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 = \"Emily Solomon\" and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 9603, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 9604, "SQL": "select transaction_date from master_txn_table where customers = \"Katherine Mills\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 9605, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jennifer Hamilton\" ) " }, { "id": 9606, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Michael Green\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 9607, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Kent Willis\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 9608, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Alexandra Salazar MD\" ) " }, { "id": 9609, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lori Bryan\" ) " }, { "id": 9610, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Jennifer Walker\"" }, { "id": 9611, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sean Weiss\" ) " }, { "id": 9612, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Mark Gomez\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') ) " }, { "id": 9613, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kathleen Benjamin\" ) " }, { "id": 9614, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Cassandra Carr\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 9615, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jenna Carson\" ) " }, { "id": 9616, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 9617, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Anna Bond\"" }, { "id": 9618, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') order by sum(debit) desc limit 1" }, { "id": 9619, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kyle Copeland\" ) " }, { "id": 9620, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Michelle Hopkins\"" }, { "id": 9621, "SQL": "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,\"Office Expenses\") and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 9622, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 9623, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Mark Williams\" ) " }, { "id": 9624, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 9625, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 9626, "SQL": "select transaction_date from master_txn_table where customers = \"Teresa Young\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 9627, "SQL": "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,\"Discounts given\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 9628, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Tamara Carr\" order by transaction_date limit 1" }, { "id": 9629, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 9630, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 9631, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Hydrogen manufacturing\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 9632, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'James Wright' or vendor = 'James Wright'" }, { "id": 9633, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Rachel Cruz\" order by transaction_date limit 1" }, { "id": 9634, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Travel\") and vendor = \"John Cooper\"" }, { "id": 9635, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Maurice Taylor II\" ) " }, { "id": 9636, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Tammy Wise\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) )" }, { "id": 9637, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 9638, "SQL": "select transaction_id from master_txn_table where customers = \"Shawn Baker\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 9639, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kimberly Lindsey\" ) " }, { "id": 9640, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 9641, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Lauren Everett\" and transaction_type = 'invoice'" }, { "id": 9642, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Jeffrey Fitzpatrick\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 9643, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Edwin Gomez\" ) " }, { "id": 9644, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Phyllis Church\"" }, { "id": 9645, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Nancy Olsen\" ) " }, { "id": 9646, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 9647, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Cody Ho\" ) " }, { "id": 9648, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 9649, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Francisco Rose DDS\" ) " }, { "id": 9650, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Joseph Wise\" ) " }, { "id": 9651, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Olivia Maddox\" ) " }, { "id": 9652, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 9653, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Amber Hernandez\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 9654, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Randy Gomez\"" }, { "id": 9655, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 9656, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Michelle Parker\"" }, { "id": 9657, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') order by sum(debit) desc limit 1" }, { "id": 9658, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Carlos Hester\"" }, { "id": 9659, "SQL": "select transaction_id from master_txn_table where product_service = \"Well casings\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 9660, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jay Chambers\" ) " }, { "id": 9661, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 9662, "SQL": "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,\"Accounting\") 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') " }, { "id": 9663, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Mark Medina\"" }, { "id": 9664, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Andrew Heath\" ) " }, { "id": 9665, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Daniel Logan\" ) " }, { "id": 9666, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Vanessa Smith\" ) " }, { "id": 9667, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 9668, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jacob Lopez\" ) " }, { "id": 9669, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Cynthia Hill\" ) " }, { "id": 9670, "SQL": "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,\"Services\") and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 9671, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Mary Hobbs' or vendor = 'Mary Hobbs'" }, { "id": 9672, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Repairing locomotives and railcars (except factory conversion, overhaul and rebuilding)\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 9673, "SQL": "select transaction_date 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 = \"Social\" order by transaction_date asc limit 1 " }, { "id": 9674, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Dawn Price\" ) " }, { "id": 9675, "SQL": "select transaction_date from master_txn_table where customers = \"Ashley Graves\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 9676, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 9677, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 9678, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 9679, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Susan Gordon\"" }, { "id": 9680, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Lauren Cooper\" order by transaction_date limit 1" }, { "id": 9681, "SQL": "select min(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 = \"Tammy Acosta\" and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 9682, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Timothy Herrera\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") ) " }, { "id": 9683, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Victor Erickson\" ) " }, { "id": 9684, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 9685, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Catering\" " }, { "id": 9686, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 9687, "SQL": "select transaction_date 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 = \"Casings, Tubes and Rods\" order by transaction_date asc limit 1 " }, { "id": 9688, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 9689, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Alexander Hatfield\" ) " }, { "id": 9690, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Austin Franklin\" order by transaction_date limit 1" }, { "id": 9691, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Samantha Walton\"" }, { "id": 9692, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 9693, "SQL": "select transaction_id from master_txn_table where product_service = \"Money Management\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 9694, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"James Valencia\" ) " }, { "id": 9695, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' 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') " }, { "id": 9696, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Catering services\") and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 9697, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 9698, "SQL": "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 support services for financial\") and 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') " }, { "id": 9699, "SQL": "select transaction_date from master_txn_table where customers = \"Jimmy Pierce\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 9700, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ashley Young\" ) " }, { "id": 9701, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Brittany Frazier\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) )" }, { "id": 9702, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 9703, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Financial Planning\" " }, { "id": 9704, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Joshua Haley\" ) " }, { "id": 9705, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kelsey Henry\" ) " }, { "id": 9706, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Child guidance services\") and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 9707, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 9708, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 9709, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Anthony Reese\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 9710, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') order by sum(debit) desc limit 1" }, { "id": 9711, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 9712, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Thomas Harvey\" ) " }, { "id": 9713, "SQL": "select transaction_id from master_txn_table where product_service = \"Design\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 9714, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 9715, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Nathan Cherry' or vendor = 'Nathan Cherry'" }, { "id": 9716, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"William Mendoza\" ) " }, { "id": 9717, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 9718, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Heather Escobar\" ) " }, { "id": 9719, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 9720, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Joseph Wade\" ) " }, { "id": 9721, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Vanessa Allen\" ) " }, { "id": 9722, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Mary Cunningham\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') )" }, { "id": 9723, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Kyle Miller\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 9724, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 9725, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Data entry services\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 9726, "SQL": "select max(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 = \"Edwin Mercer\" and 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') " }, { "id": 9727, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Matthew Mcneil\" ) " }, { "id": 9728, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Brooke Martinez\" order by transaction_date limit 1" }, { "id": 9729, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Willie Young\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 9730, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jonathan Boone\" and transaction_type = 'invoice'" }, { "id": 9731, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Spearmint oil\" " }, { "id": 9732, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Duane Strickland\" ) " }, { "id": 9733, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 9734, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Vanessa Alexander\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') )" }, { "id": 9735, "SQL": "select max(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 = \"Matthew Garcia\" and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 9736, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') order by sum(debit) desc limit 1" }, { "id": 9737, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jennifer Lowe\" ) " }, { "id": 9738, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Matthew Beck\" ) " }, { "id": 9739, "SQL": "select sum(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Wardrobe\" " }, { "id": 9740, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Railroad Equipment\" " }, { "id": 9741, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Alisha Macdonald\" ) " }, { "id": 9742, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Bars and nightclubs\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 9743, "SQL": "select transaction_date from master_txn_table where customers = \"Nicole Donaldson\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 9744, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"David Valencia\" ) " }, { "id": 9745, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Financial\" " }, { "id": 9746, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Joseph Bush\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') ) " }, { "id": 9747, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 9748, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Jeffrey Kelly\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 9749, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and 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') group by billing_city" }, { "id": 9750, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Nicholas Bean\" ) " }, { "id": 9751, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Rent or Lease\") and vendor = \"Kim Cook\"" }, { "id": 9752, "SQL": "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,\"Quality management accreditation\") and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 9753, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jared Salazar\" ) " }, { "id": 9754, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 9755, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Kyle Snow\" order by transaction_date limit 1" }, { "id": 9756, "SQL": "select max(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 = \"Garrett Michael\" and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 9757, "SQL": "select transaction_id from master_txn_table where product_service = \"Popular music shows\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 9758, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'James Trevino' or vendor = 'James Trevino'" }, { "id": 9759, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Carly Conway\"" }, { "id": 9760, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jeremy Evans\" ) " }, { "id": 9761, "SQL": "select transaction_id from master_txn_table where customers = \"Jessica Gonzales\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 9762, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 9763, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Daniel Gallagher\"" }, { "id": 9764, "SQL": "select transaction_id from master_txn_table where product_service = \"environmental projects\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 9765, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Donna Ochoa\" ) " }, { "id": 9766, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"William Anderson\"" }, { "id": 9767, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Joel Stanton\"" }, { "id": 9768, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 9769, "SQL": "select transaction_date from master_txn_table where customers = \"Ashley Morales\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 9770, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") and account_type in ('Expense','Other Expense') " }, { "id": 9771, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Mason Ayers\" order by transaction_date limit 1" }, { "id": 9772, "SQL": "select transaction_date 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 = \"Accessories\" order by transaction_date asc limit 1 " }, { "id": 9773, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Mariah Johnson\" ) " }, { "id": 9774, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Melissa Contreras\" and transaction_type = 'invoice'" }, { "id": 9775, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 9776, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Douglas Carey' or vendor = 'Douglas Carey'" }, { "id": 9777, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 9778, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Sara Martinez\"" }, { "id": 9779, "SQL": "select transaction_date from master_txn_table where customers = \"Michelle Bonilla\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 9780, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date) AND date(current_date) group by billing_city" }, { "id": 9781, "SQL": "select transaction_id from master_txn_table where customers = \"Susan Mccormick DVM\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 9782, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Anna Willis\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) ) " }, { "id": 9783, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Ryan Anderson\"" }, { "id": 9784, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Stephanie Evans\" and transaction_type = 'invoice'" }, { "id": 9785, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Gary Yates\"" }, { "id": 9786, "SQL": "select sum(credit) from master_txn_table where product_service = \"License fees\" 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') " }, { "id": 9787, "SQL": "select sum(credit) from master_txn_table where product_service = \"Healthcare\" and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 9788, "SQL": "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,\"Computer Repairs\") and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 9789, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Development of other voice and speech recognition products\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 9790, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 9791, "SQL": "select transaction_date from master_txn_table where customers = \"John Fields\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 9792, "SQL": "select sum(credit) from master_txn_table where product_service = \"Aeronautical Equipment\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 9793, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 9794, "SQL": "select transaction_date 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 = \"Quality assessment\" order by transaction_date asc limit 1 " }, { "id": 9795, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") group by product_service order by sum(credit) desc limit 1" }, { "id": 9796, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Margaret Chavez\" ) " }, { "id": 9797, "SQL": "select transaction_date from master_txn_table where customers = \"Sarah Mckinney\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 9798, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 9799, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Musicians\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 9800, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Kyle George\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 9801, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 9802, "SQL": "select min(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 = \"Teresa Price\" and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 9803, "SQL": "select min(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 = \"Ralph Ross\" and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 9804, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Abigail Miller' or vendor = 'Abigail Miller'" }, { "id": 9805, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Ryan Esparza\"" }, { "id": 9806, "SQL": "select transaction_date from master_txn_table where customers = \"Tommy Beard\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 9807, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kimberly Schmidt\" ) " }, { "id": 9808, "SQL": "select transaction_date from master_txn_table where customers = \"Dustin Hall\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 9809, "SQL": "select transaction_date from master_txn_table where customers = \"Nathan Campbell\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 9810, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Malik Byrd\"" }, { "id": 9811, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Miss Elaine Garner\" ) " }, { "id": 9812, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Promotional\") and vendor = \"Lauren Shelton\"" }, { "id": 9813, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Nicole Kaufman\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 9814, "SQL": "select product_service, 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 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') group by product_service order by sum(credit) desc limit 1" }, { "id": 9815, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 9816, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Ronald Bailey\" order by transaction_date limit 1" }, { "id": 9817, "SQL": "select transaction_date 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 = \"AI Courses\" order by transaction_date asc limit 1 " }, { "id": 9818, "SQL": "select min(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 = \"Michelle Howell\" and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 9819, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by billing_city" }, { "id": 9820, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 9821, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Providing brokerage services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 9822, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Event-driven\" " }, { "id": 9823, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Stephanie Powell\" and transaction_type = 'invoice'" }, { "id": 9824, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 9825, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Pool maintenance\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 9826, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Amber Valdez\" ) " }, { "id": 9827, "SQL": "select sum(credit) from master_txn_table where product_service = \"Tournaments and Matches\" and 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') " }, { "id": 9828, "SQL": "select transaction_date from master_txn_table where customers = \"David Gardner\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 9829, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Teresa White\" ) " }, { "id": 9830, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Patricia Gentry\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 9831, "SQL": "select sum(credit) from master_txn_table where product_service = \"Intravenous Therapy\" and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 9832, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Hotels and motel services\") and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 9833, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 9834, "SQL": "select avg(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 = \"Nathaniel Montgomery\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 9835, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Jennifer Kelley MD\"" }, { "id": 9836, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Alexa Allen\" ) " }, { "id": 9837, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Daily living assistance\") and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 9838, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 9839, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Jennifer Snyder' or vendor = 'Jennifer Snyder'" }, { "id": 9840, "SQL": "select transaction_date 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 = \"Cementing walls\" order by transaction_date asc limit 1 " }, { "id": 9841, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Emily Taylor\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 9842, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Pamela Harris\" ) " }, { "id": 9843, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Matthew Weaver\" ) " }, { "id": 9844, "SQL": "select transaction_date 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\" order by transaction_date asc limit 1 " }, { "id": 9845, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 9846, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kurt Martinez\" ) " }, { "id": 9847, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 9848, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Chimney sweep services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 9849, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Arthur Shaw\"" }, { "id": 9850, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Jeffrey Barton\"" }, { "id": 9851, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Paul Cervantes\" order by transaction_date limit 1" }, { "id": 9852, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Pool maintenance\") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 9853, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Valerie Matthews\" ) " }, { "id": 9854, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 9855, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 9856, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Seth Smith\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date) AND date(current_date) )" }, { "id": 9857, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Rent or Lease\") and vendor = \"Debra Anderson\"" }, { "id": 9858, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Alexandra Salazar MD\"" }, { "id": 9859, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 9860, "SQL": "select transaction_date 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 = \"Therapeutic\" order by transaction_date asc limit 1 " }, { "id": 9861, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 9862, "SQL": "select max(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 = \"Kim Cohen\" and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 9863, "SQL": "select transaction_date from master_txn_table where customers = \"Tina Fleming\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 9864, "SQL": "select transaction_id from master_txn_table where customers = \"Megan Jenkins\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 9865, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Other non-renewable power generation\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 9866, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Diane Meadows' or vendor = 'Diane Meadows'" }, { "id": 9867, "SQL": "select transaction_id from master_txn_table where customers = \"David Clements\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 9868, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Full-service restaurants\") and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 9869, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Kathryn Griffin' or vendor = 'Kathryn Griffin'" }, { "id": 9870, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Anne Daniel\" order by transaction_date limit 1" }, { "id": 9871, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 9872, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Margaret Ray\" ) " }, { "id": 9873, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jason Olsen\" ) " }, { "id": 9874, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Trust and Fiduciary\" " }, { "id": 9875, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Dawn Robinson\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 9876, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Dylan Johnson\" ) " }, { "id": 9877, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 9878, "SQL": "select min(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 = \"Martha Wade\" and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 9879, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Raymond Garrett\" ) " }, { "id": 9880, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Biogenic municipal waste-fueled power generation\") and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 9881, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 9882, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Johnny Holland\" and transaction_type = 'invoice'" }, { "id": 9883, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Theresa Kim\" and transaction_type = 'payment' 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') )" }, { "id": 9884, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 9885, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 9886, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 9887, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Equipment Repairs\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 9888, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Joshua Williamson\" ) " }, { "id": 9889, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Randall Ryan\" and transaction_type = 'invoice'" }, { "id": 9890, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Deborah Morris\" and transaction_type = 'invoice'" }, { "id": 9891, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Amy Gutierrez' or vendor = 'Amy Gutierrez'" }, { "id": 9892, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 9893, "SQL": "select min(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 = \"Daniel Evans\" and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 9894, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 9895, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jacob Crawford\" order by transaction_date limit 1" }, { "id": 9896, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Vanessa West\"" }, { "id": 9897, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 9898, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Corey Mcmahon\"" }, { "id": 9899, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Travis Sanchez' or vendor = 'Travis Sanchez'" }, { "id": 9900, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Teresa Henry\" order by transaction_date limit 1" }, { "id": 9901, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Traci Hall\" ) " }, { "id": 9902, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Roberto Wilson\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') )" }, { "id": 9903, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 9904, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Jennifer Nunez\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 9905, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Autumn Brown\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 9906, "SQL": "select sum(credit) from master_txn_table where product_service = \"Outdoor goods\" and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 9907, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 9908, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 9909, "SQL": "select transaction_date from master_txn_table where customers = \"Daniel Pennington\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 9910, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Derrick Moore\" ) " }, { "id": 9911, "SQL": "select transaction_date from master_txn_table where customers = \"Michele Gonzales\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 9912, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Bank Charges\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 9913, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Valerie Allison\" ) " }, { "id": 9914, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Taylor Gonzales\" order by transaction_date limit 1" }, { "id": 9915, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Victor Lara\" ) " }, { "id": 9916, "SQL": "select transaction_id from master_txn_table where product_service = \"Commodity Markets\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 9917, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 9918, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 9919, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Providing brokerage services\") and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 9920, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 9921, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 9922, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and 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') " }, { "id": 9923, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 9924, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Melissa Andrews\" ) " }, { "id": 9925, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Katherine Wilkinson\" and account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 9926, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 9927, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Christopher Dyer\" and transaction_type = 'invoice'" }, { "id": 9928, "SQL": "select sum(credit) from master_txn_table where product_service = \"attached and detached units\" and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 9929, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Basic office and secretarial skills training\") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 9930, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ashlee Ramirez\" ) " }, { "id": 9931, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Ivan Vargas\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 9932, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Providing freight car cleaning services\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 9933, "SQL": "select sum(credit) from master_txn_table where product_service = \"Miscellaneous\" and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 9934, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Jason Ewing\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 9935, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Charles Lindsey\"" }, { "id": 9936, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 9937, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Timothy Franklin\" and transaction_type = 'payment' 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') )" }, { "id": 9938, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and 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') " }, { "id": 9939, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') and account_type in ('Expense','Other Expense') " }, { "id": 9940, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 9941, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Glenn Graves\" ) " }, { "id": 9942, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Ashley Webb\" and account_type in ('Expense','Other Expense') 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') " }, { "id": 9943, "SQL": "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,\"Memberships\") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 9944, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Vicki Stanley\" ) " }, { "id": 9945, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 9946, "SQL": "select transaction_date 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 = \"Equity long/short\" order by transaction_date asc limit 1 " }, { "id": 9947, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Sarah Downs\"" }, { "id": 9948, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Michelle Mcknight\" ) " }, { "id": 9949, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') order by sum(debit) desc limit 1" }, { "id": 9950, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 9951, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 9952, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Katie Cunningham\" order by transaction_date limit 1" }, { "id": 9953, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Nursing and health\" " }, { "id": 9954, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 9955, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 9956, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 9957, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Claudia Allen\" order by transaction_date limit 1" }, { "id": 9958, "SQL": "select transaction_id from master_txn_table where customers = \"Jennifer Palmer\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 9959, "SQL": "select transaction_id from master_txn_table where product_service = \"Grapefruit oil\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 9960, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Boat, ship and steamship rental or leasing\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 9961, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Leon Hahn\" order by transaction_date limit 1" }, { "id": 9962, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Bonnie Wong' or vendor = 'Bonnie Wong'" }, { "id": 9963, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 9964, "SQL": "select max(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 = \"Larry Hudson\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 9965, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 9966, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Melissa Nash\" and transaction_type = 'invoice'" }, { "id": 9967, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Maria Flores\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 9968, "SQL": "select sum(credit) from master_txn_table where product_service = \"Non-nuclear\" and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 9969, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Tyler Arnold\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 9970, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Shannon Diaz\" ) " }, { "id": 9971, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Todd Peterson\" ) " }, { "id": 9972, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Brendan Glover\" order by transaction_date limit 1" }, { "id": 9973, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jeff Campos\" ) " }, { "id": 9974, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Alice Allen\" ) " }, { "id": 9975, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Keith Hicks\"" }, { "id": 9976, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Ventilation cleaning\" " }, { "id": 9977, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Timothy Rhodes\" ) " }, { "id": 9978, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Martha Ortiz\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') )" }, { "id": 9979, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Jim Elliott\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') )" }, { "id": 9980, "SQL": "select transaction_id from master_txn_table where customers = \"Wendy Adkins\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 9981, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lisa Johnston\" ) " }, { "id": 9982, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 9983, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Nancy Grant\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') )" }, { "id": 9984, "SQL": "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 storage and management services\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 9985, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 9986, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jared Nelson\" order by transaction_date limit 1" }, { "id": 9987, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 9988, "SQL": "select transaction_date from master_txn_table where customers = \"Zoe Sutton\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 9989, "SQL": "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,\"Recognition software for healthcare\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 9990, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 9991, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Travel\") and vendor = \"Lori Morris\"" }, { "id": 9992, "SQL": "select sum(credit) from master_txn_table where product_service = \"Oxygen\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 9993, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') order by sum(debit) desc limit 1" }, { "id": 9994, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 9995, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Offering equity long/short \") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 9996, "SQL": "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,\"Occupational and vocational therapy\") and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 9997, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Tiffany Nolan\" ) " }, { "id": 9998, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Jimmy Leon\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 9999, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Helium\" " }, { "id": 10000, "SQL": "select transaction_date from master_txn_table where customers = \"Ray Brooks\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 10001, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Manufacturing industrial organic gases\") and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 10002, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Physical Therapy\" " }, { "id": 10003, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Coal Power generation\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 10004, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 10005, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jeffrey Humphrey\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 10006, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Lisa Ross\" and transaction_type = 'invoice'" }, { "id": 10007, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Jessica Morales MD\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 10008, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 10009, "SQL": "select transaction_date from master_txn_table where customers = \"Scott Casey\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 10010, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 10011, "SQL": "select transaction_id from master_txn_table where customers = \"Shannon Gutierrez\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 10012, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 10013, "SQL": "select sum(credit) from master_txn_table where product_service = \"Meals\" and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 10014, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Troy Dougherty\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') )" }, { "id": 10015, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Shannon Grant\" and transaction_type = 'invoice'" }, { "id": 10016, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"David Jacobs\" ) " }, { "id": 10017, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 10018, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Julie Cannon\" and account_type in ('Expense','Other Expense') and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 10019, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) group by billing_city" }, { "id": 10020, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 10021, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 10022, "SQL": "select transaction_date from master_txn_table where customers = \"Susan Barron\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 10023, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') and account_type in ('Expense','Other Expense') " }, { "id": 10024, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Tina Smith\"" }, { "id": 10025, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Carolyn Valentine\" and transaction_type = 'invoice'" }, { "id": 10026, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Theresa Kelly\"" }, { "id": 10027, "SQL": "select transaction_date from master_txn_table where customers = \"Peter Stevens\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 10028, "SQL": "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,\"Running, cutting and pulling casings, tubes and rods\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 10029, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Stephen Owens\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') )" }, { "id": 10030, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Malik Austin\" ) " }, { "id": 10031, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Wendy Curtis\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 10032, "SQL": "select sum(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Pool maintenance\" " }, { "id": 10033, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 10034, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Scott Li\" order by transaction_date limit 1" }, { "id": 10035, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Joshua Benton\" ) " }, { "id": 10036, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 10037, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 10038, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 10039, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 10040, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Andrew Oneill\" and transaction_type = 'invoice'" }, { "id": 10041, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by billing_city" }, { "id": 10042, "SQL": "select transaction_date from master_txn_table where customers = \"Lisa Calderon\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 10043, "SQL": "select sum(credit) from master_txn_table where product_service = \"Environmental impact assessment\" and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 10044, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Ronald Delacruz\" order by transaction_date limit 1" }, { "id": 10045, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 10046, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Dakota Roach\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) )" }, { "id": 10047, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Melissa Castillo\" ) " }, { "id": 10048, "SQL": "select transaction_date from master_txn_table where customers = \"Mark Sanders\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 10049, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Andrew Romero\" ) " }, { "id": 10050, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Adrian Anderson\" ) " }, { "id": 10051, "SQL": "select sum(credit) from master_txn_table where product_service = \"--\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 10052, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Miscellaneous\" " }, { "id": 10053, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Mark Weber\" ) " }, { "id": 10054, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 10055, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Amy Brandt\" order by transaction_date limit 1" }, { "id": 10056, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 10057, "SQL": "select transaction_date 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 = \"Care-planning\" order by transaction_date asc limit 1 " }, { "id": 10058, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Aaron Ferguson\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 10059, "SQL": "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 personal care\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 10060, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Danny Wilson\" order by transaction_date limit 1" }, { "id": 10061, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Brittney Green\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') )" }, { "id": 10062, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Rachael Novak\" ) " }, { "id": 10063, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') 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') order by sum(debit) desc limit 1" }, { "id": 10064, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Mary Ellis\" ) " }, { "id": 10065, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Amanda Galvan\" ) " }, { "id": 10066, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Daniel Vance\" ) " }, { "id": 10067, "SQL": "select transaction_date 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 = \"Design\" order by transaction_date asc limit 1 " }, { "id": 10068, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 10069, "SQL": "select transaction_id from master_txn_table where product_service = \"Rail support\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 10070, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Nonmetallic mineral ore exploration\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 10071, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Donna Vincent\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 10072, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Scott Gonzalez\"" }, { "id": 10073, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Linda Reeves\"" }, { "id": 10074, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Todd Fernandez\"" }, { "id": 10075, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 10076, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Danielle Bennett\"" }, { "id": 10077, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 10078, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Hannah Byrd\"" }, { "id": 10079, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 10080, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Meredith Mcconnell\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 10081, "SQL": "select transaction_id from master_txn_table where customers = \"Penny Long\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 10082, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Meagan Archer\" order by transaction_date limit 1" }, { "id": 10083, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Paul Murphy\" ) " }, { "id": 10084, "SQL": "select transaction_id from master_txn_table where customers = \"Cody Nelson\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 10085, "SQL": "select transaction_date from master_txn_table where customers = \"Arthur Alexander\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 10086, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 10087, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Megan Vega\" and account_type in ('Expense','Other Expense') 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') " }, { "id": 10088, "SQL": "select transaction_id from master_txn_table where customers = \"Tracy Krause\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 10089, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Nancy Robertson\" ) " }, { "id": 10090, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Wholesaling boats (except pleasure)\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 10091, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 10092, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Tiffany Shepherd\" order by transaction_date limit 1" }, { "id": 10093, "SQL": "select max(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 = \"Sean Ramirez\" and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 10094, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 10095, "SQL": "select transaction_date from master_txn_table where customers = \"Sheila Allen\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 10096, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Rachel Aguilar\" ) " }, { "id": 10097, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") and account_type in ('Expense','Other Expense') " }, { "id": 10098, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Fluorocarbon gases\" " }, { "id": 10099, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Baby car seats\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 10100, "SQL": "select sum(credit) from master_txn_table where product_service = \"Breeding\" and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 10101, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 10102, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Steven Newton\" ) " }, { "id": 10103, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 10104, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') order by sum(debit) desc limit 1" }, { "id": 10105, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Linda Clayton\" ) " }, { "id": 10106, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 10107, "SQL": "select transaction_date from master_txn_table where customers = \"Susan Wright\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 10108, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Kathleen Cooper\" order by transaction_date limit 1" }, { "id": 10109, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Angela Manning\" order by transaction_date limit 1" }, { "id": 10110, "SQL": "select sum(credit) from master_txn_table where product_service = \"Bars and Nightclubs\" and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 10111, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 10112, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Terry Montgomery\" and transaction_type = 'invoice'" }, { "id": 10113, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 10114, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') and account_type in ('Expense','Other Expense') " }, { "id": 10115, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Karen Fleming\" order by transaction_date limit 1" }, { "id": 10116, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Megan Velez\" ) " }, { "id": 10117, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"George Richard\" and transaction_type = 'invoice'" }, { "id": 10118, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') and account_type in ('Expense','Other Expense') " }, { "id": 10119, "SQL": "select transaction_date from master_txn_table where customers = \"Leslie Ramirez\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 10120, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Christine Harrell\" order by transaction_date limit 1" }, { "id": 10121, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Daniel Velasquez\" ) " }, { "id": 10122, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kristen Mack\" ) " }, { "id": 10123, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Jon Sullivan\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) ) " }, { "id": 10124, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Maurice Jones' or vendor = 'Maurice Jones'" }, { "id": 10125, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Meghan Holmes\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 10126, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 10127, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jenna Khan\" ) " }, { "id": 10128, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Allen Mcclure' or vendor = 'Allen Mcclure'" }, { "id": 10129, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Christian Mathis\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) ) " }, { "id": 10130, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 10131, "SQL": "select transaction_date from master_txn_table where customers = \"Melanie Ellis\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 10132, "SQL": "select max(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 = \"Benjamin Freeman\" and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 10133, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Andrew Rogers\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 10134, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Legal & Professional Fees\") and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 10135, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') group by billing_city" }, { "id": 10136, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Casey Tyler' or vendor = 'Casey Tyler'" }, { "id": 10137, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Shane Santiago\" ) " }, { "id": 10138, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Patrick Patel\" ) " }, { "id": 10139, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Providing brokerage services\") and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 10140, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Donna Hale\" ) " }, { "id": 10141, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') group by billing_city" }, { "id": 10142, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 10143, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 10144, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Window washing\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 10145, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 10146, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Samantha Kane\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 10147, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sophia Leonard\" ) " }, { "id": 10148, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Ana Smith\"" }, { "id": 10149, "SQL": "select transaction_id from master_txn_table where product_service = \"Opera\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 10150, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Patrick Murphy\"" }, { "id": 10151, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brenda Fields\" ) " }, { "id": 10152, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brett Melendez\" ) " }, { "id": 10153, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 10154, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Robin Guerrero\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 10155, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Coal Pwer\" " }, { "id": 10156, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Adam Norton\" ) " }, { "id": 10157, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Scott Huffman\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) )" }, { "id": 10158, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Albert Lopez\" order by transaction_date limit 1" }, { "id": 10159, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Douglas Holmes\" ) " }, { "id": 10160, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 10161, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Eric Mcpherson\" ) " }, { "id": 10162, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 10163, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kevin Hamilton\" ) " }, { "id": 10164, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 10165, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Duct and gutter cleaning\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 10166, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"David Fields\" order by transaction_date limit 1" }, { "id": 10167, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Child abuse prevention\" " }, { "id": 10168, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 10169, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Randy Melton\" order by transaction_date limit 1" }, { "id": 10170, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Lindsay Flores\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 10171, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 10172, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Amber Mueller' or vendor = 'Amber Mueller'" }, { "id": 10173, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Vanessa Davila\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) )" }, { "id": 10174, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Steven Thompson\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 10175, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 10176, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Anna Sanford\" ) " }, { "id": 10177, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') group by product_service order by sum(credit) desc limit 1" }, { "id": 10178, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Regina Newman\" ) " }, { "id": 10179, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Wendy Avila\"" }, { "id": 10180, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 10181, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"James Beck\" ) " }, { "id": 10182, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 10183, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Intravenous Therapy\" " }, { "id": 10184, "SQL": "select transaction_date 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 = \"Popular music shows\" order by transaction_date asc limit 1 " }, { "id": 10185, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Martin Dixon\" ) " }, { "id": 10186, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Lindsey Caldwell\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) ) " }, { "id": 10187, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Derek Garner\" order by transaction_date limit 1" }, { "id": 10188, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 10189, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kyle Copeland\" ) " }, { "id": 10190, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"John Todd\" and transaction_type = 'payment' and 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') ) " }, { "id": 10191, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Tanya Garcia\" ) " }, { "id": 10192, "SQL": "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,\"Quality management assessment\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 10193, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kenneth Boone\" ) " }, { "id": 10194, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Bradley Wilson\" ) " }, { "id": 10195, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') group by billing_city" }, { "id": 10196, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Joshua Reeves MD\" ) " }, { "id": 10197, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Beverly Perry\" order by transaction_date limit 1" }, { "id": 10198, "SQL": "select avg(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 = \"Erika Vasquez\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 10199, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 10200, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by billing_city" }, { "id": 10201, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Aircraft rental or leasing\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 10202, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 10203, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 10204, "SQL": "select transaction_date from master_txn_table where customers = \"Breanna Kirby\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 10205, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 10206, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Brian Flowers\" and transaction_type = 'invoice'" }, { "id": 10207, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Suzanne Vazquez\" ) " }, { "id": 10208, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 10209, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Steven York\" and transaction_type = 'invoice'" }, { "id": 10210, "SQL": "select max(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 = \"Edward Morris\" 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') " }, { "id": 10211, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 10212, "SQL": "select transaction_date from master_txn_table where customers = \"Erik Flynn\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 10213, "SQL": "select sum(credit) from master_txn_table where product_service = \"Bangalow\" and 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') " }, { "id": 10214, "SQL": "select transaction_date from master_txn_table where customers = \"Misty Edwards MD\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 10215, "SQL": "select transaction_date from master_txn_table where customers = \"Shelby Dillon\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 10216, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Manufacturing peppermint oil\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 10217, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 10218, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 10219, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jennifer Cook DDS\" ) " }, { "id": 10220, "SQL": "select transaction_id from master_txn_table where product_service = \"Railcar\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 10221, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"James Woods\" ) " }, { "id": 10222, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Natasha Lin\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) ) " }, { "id": 10223, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 10224, "SQL": "select sum(credit) from master_txn_table where product_service = \"Spraying\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 10225, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Kimberly Ware\" order by transaction_date limit 1" }, { "id": 10226, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 10227, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) group by billing_city" }, { "id": 10228, "SQL": "select transaction_date from master_txn_table where customers = \"Dustin Holmes\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 10229, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jason Estrada\" ) " }, { "id": 10230, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Margaret Allen\"" }, { "id": 10231, "SQL": "select sum(credit) from master_txn_table where product_service = \"Foster Care\" and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 10232, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Manufacturing grapefruit oil\") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 10233, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Chase Shea\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 10234, "SQL": "select transaction_date 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 = \"Waste-fueled\" order by transaction_date asc limit 1 " }, { "id": 10235, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Amy Hammond\" ) " }, { "id": 10236, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Maria Atkins\" ) " }, { "id": 10237, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 10238, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Miscellaneous services\") and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 10239, "SQL": "select transaction_date from master_txn_table where customers = \"Russell Stewart\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 10240, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 10241, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Coal exploration\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 10242, "SQL": "select transaction_date 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 = \"Financial Planning\" order by transaction_date asc limit 1 " }, { "id": 10243, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Eric Lloyd\" and transaction_type = 'invoice'" }, { "id": 10244, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 10245, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Mathew Larson\" ) " }, { "id": 10246, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Timothy Green\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 10247, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Diana Thomas\" ) " }, { "id": 10248, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Marie Price\" ) " }, { "id": 10249, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Henry Galvan\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 10250, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Joanna Williams\" order by transaction_date limit 1" }, { "id": 10251, "SQL": "select sum(credit) from master_txn_table where product_service = \"Non-renewable\" and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 10252, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Robert Hudson\"" }, { "id": 10253, "SQL": "select transaction_date from master_txn_table where customers = \"Katherine Figueroa\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 10254, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 10255, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Richard Park\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 10256, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') group by billing_city" }, { "id": 10257, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Mary Sanchez\"" }, { "id": 10258, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 10259, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Kimberly Norman\" order by transaction_date limit 1" }, { "id": 10260, "SQL": "select product_service, 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 transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') group by product_service order by sum(credit) desc limit 1" }, { "id": 10261, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Services\") and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 10262, "SQL": "select transaction_id from master_txn_table where customers = \"Emma York\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 10263, "SQL": "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,\"Abandoned infant assistance\") and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 10264, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Zachary Watson\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 10265, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 10266, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Christopher Calhoun\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 10267, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Shawn Harris\" ) " }, { "id": 10268, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Popular music shows\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 10269, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 10270, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 10271, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Wardrobe\" " }, { "id": 10272, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Brittney Pope\" and transaction_type = 'invoice'" }, { "id": 10273, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Shawn Stafford\" ) " }, { "id": 10274, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Andrew Lawrence\" ) " }, { "id": 10275, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Tammy Mccann\" ) " }, { "id": 10276, "SQL": "select transaction_date from master_txn_table where customers = \"Natalie Torres\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 10277, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Elizabeth Perez MD\" ) " }, { "id": 10278, "SQL": "select transaction_date 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 = \"Money Management\" order by transaction_date asc limit 1 " }, { "id": 10279, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) group by billing_city" }, { "id": 10280, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 10281, "SQL": "select min(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 = \"Anita Powell\" and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 10282, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Kendra Miller\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 10283, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Christopher Cunningham' or vendor = 'Christopher Cunningham'" }, { "id": 10284, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 10285, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Diana King\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 10286, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Carl Jenkins\"" }, { "id": 10287, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Audrey Green\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 10288, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Ruth Wheeler\"" }, { "id": 10289, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Katherine Hart\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 10290, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Barge rental or leasing\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 10291, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 10292, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' 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') " }, { "id": 10293, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Christopher Duke\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 10294, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Lynn Williams\" and transaction_type = 'invoice'" }, { "id": 10295, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') order by sum(debit) desc limit 1" }, { "id": 10296, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 10297, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Wesley Burns\" ) " }, { "id": 10298, "SQL": "select transaction_id from master_txn_table where product_service = \"Services\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 10299, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Amber Cardenas' or vendor = 'Amber Cardenas'" }, { "id": 10300, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Andrea Montgomery\" order by transaction_date limit 1" }, { "id": 10301, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 10302, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Charles Hawkins\" and transaction_type = 'invoice'" }, { "id": 10303, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Amy Ortiz\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 10304, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Musical\" " }, { "id": 10305, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Julie Nichols\" ) " }, { "id": 10306, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Joseph Moss\" and transaction_type = 'invoice'" }, { "id": 10307, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Steve Morris\" ) " }, { "id": 10308, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Amber Zimmerman\" order by transaction_date limit 1" }, { "id": 10309, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Christopher Raymond\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 10310, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Justin Nelson\" ) " }, { "id": 10311, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Amateur sports teams and club servcies\") and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 10312, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Fuel\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 10313, "SQL": "select transaction_date from master_txn_table where customers = \"Timothy Henderson\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 10314, "SQL": "select transaction_id from master_txn_table where product_service = \"Synthetic Oils\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 10315, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Mike Case\"" }, { "id": 10316, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Constructing multifamily residential\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 10317, "SQL": "select transaction_id from master_txn_table where product_service = \"Aeronautical Equipment\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 10318, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Shannon Donaldson\" ) " }, { "id": 10319, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Natalie Green' or vendor = 'Natalie Green'" }, { "id": 10320, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"David Black\" ) " }, { "id": 10321, "SQL": "select transaction_date from master_txn_table where customers = \"Todd Morris\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 10322, "SQL": "select transaction_date from master_txn_table where customers = \"Suzanne Francis\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 10323, "SQL": "select transaction_id from master_txn_table where product_service = \"Locomotives\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 10324, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Julie Allen\" ) " }, { "id": 10325, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 10326, "SQL": "select transaction_date 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 = \"Providing other outdoor maintenance services\" order by transaction_date asc limit 1 " }, { "id": 10327, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Karen Greene\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 10328, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Christopher Ortega\"" }, { "id": 10329, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 10330, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Computer software and software application training\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 10331, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Dylan Wallace\" ) " }, { "id": 10332, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 10333, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"William Bailey\" ) " }, { "id": 10334, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 10335, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Nicholas Bridges\"" }, { "id": 10336, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Kristopher Wells\"" }, { "id": 10337, "SQL": "select transaction_date 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 = \"Social\" order by transaction_date asc limit 1 " }, { "id": 10338, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Henry Brown\" order by transaction_date limit 1" }, { "id": 10339, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 10340, "SQL": "select max(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 = \"Lorraine Green\" and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 10341, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 10342, "SQL": "select min(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 = \"Gregory Vega\" and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 10343, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Photocopying services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 10344, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 10345, "SQL": "select sum(credit) from master_txn_table where product_service = \"environmental projects\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 10346, "SQL": "select transaction_id from master_txn_table where product_service = \"Nonfossil-fuel\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 10347, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Jeremy Daniel\"" }, { "id": 10348, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 10349, "SQL": "select transaction_date 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 = \"Mobile Device\" order by transaction_date asc limit 1 " }, { "id": 10350, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 10351, "SQL": "select max(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 = \"James Torres MD\" and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 10352, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lindsay Gibson\" ) " }, { "id": 10353, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Charlotte Hughes\" order by transaction_date limit 1" }, { "id": 10354, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Brian Elliott\"" }, { "id": 10355, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Harry Potter\" and transaction_type = 'invoice'" }, { "id": 10356, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Shannon Richardson\" ) " }, { "id": 10357, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Thomas Roy\" and transaction_type = 'payment' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') ) " }, { "id": 10358, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by billing_city" }, { "id": 10359, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 10360, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 10361, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Marcus Curry\" ) " }, { "id": 10362, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 10363, "SQL": "select avg(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 = \"Alexandra Bradshaw\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 10364, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Non-renewable\" " }, { "id": 10365, "SQL": "select min(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 = \"Christina Moses\" and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 10366, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kimberly Pacheco\" ) " }, { "id": 10367, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 10368, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Melissa Yu\" ) " }, { "id": 10369, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') and account_type in ('Expense','Other Expense') " }, { "id": 10370, "SQL": "select transaction_id from master_txn_table where product_service = \"Club \" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 10371, "SQL": "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,\"Offering equity long bias\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 10372, "SQL": "select transaction_id from master_txn_table where customers = \"Peter Jones\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 10373, "SQL": "select sum(credit) from master_txn_table where product_service = \"Railroad switching\" and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 10374, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 10375, "SQL": "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,\"Unapplied Cash Bill Payment Expense\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 10376, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 10377, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Matthew Torres\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) ) " }, { "id": 10378, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lance Garcia\" ) " }, { "id": 10379, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Development of software products for Tablets\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 10380, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Manufacturing peppermint oil\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 10381, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 10382, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Telephone\") and 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') " }, { "id": 10383, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') group by billing_city" }, { "id": 10384, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Cody Nelson\" ) " }, { "id": 10385, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by billing_city" }, { "id": 10386, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Katherine Figueroa\" ) " }, { "id": 10387, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 10388, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Martin Anderson\" order by transaction_date limit 1" }, { "id": 10389, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 10390, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Brandi Hale MD\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 10391, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Alex Davis\" ) " }, { "id": 10392, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Teen outreach services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 10393, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Flowers\") and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 10394, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sonya Miller\" ) " }, { "id": 10395, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 10396, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Colin Ray\"" }, { "id": 10397, "SQL": "select min(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 = \"Shannon Lowe\" and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 10398, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Wendy Singh\" ) " }, { "id": 10399, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Mark Guerrero\" and transaction_type = 'invoice'" }, { "id": 10400, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by billing_city" }, { "id": 10401, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 10402, "SQL": "select transaction_id from master_txn_table where product_service = \"Construction activities\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 10403, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Development of other voice and speech recognition products\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 10404, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Krista Chambers\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 10405, "SQL": "select product_service, 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 transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') group by product_service order by sum(credit) desc limit 1" }, { "id": 10406, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 10407, "SQL": "select transaction_date from master_txn_table where customers = \"Jasmine Mercer\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 10408, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 10409, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jane Ramirez\" and transaction_type = 'invoice'" }, { "id": 10410, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Retailing Chairs\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 10411, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Michael Lopez\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 10412, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Dustin Goodman\" ) " }, { "id": 10413, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 10414, "SQL": "select transaction_date 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 = \"Fast food\" order by transaction_date asc limit 1 " }, { "id": 10415, "SQL": "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,\"Livestock health services\") and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 10416, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jesse Duncan\" ) " }, { "id": 10417, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 10418, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jeffrey Morris\" ) " }, { "id": 10419, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date) AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 10420, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"William Scott PhD\" order by transaction_date limit 1" }, { "id": 10421, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 10422, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Therapeutic services\") and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 10423, "SQL": "select transaction_date from master_txn_table where customers = \"Cristina Decker\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 10424, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Michelle Huynh\" ) " }, { "id": 10425, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Carolyn Macias\" ) " }, { "id": 10426, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Willie Gonzalez\"" }, { "id": 10427, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 10428, "SQL": "select min(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 = \"John Butler\" and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 10429, "SQL": "select transaction_date 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 = \"Home Therapy\" order by transaction_date asc limit 1 " }, { "id": 10430, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 10431, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 10432, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 10433, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Sandy Bishop\"" }, { "id": 10434, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 10435, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jeremy Acosta\" ) " }, { "id": 10436, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Kimberly Snow\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) ) " }, { "id": 10437, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Christy Simmons DDS\" ) " }, { "id": 10438, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 10439, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 10440, "SQL": "select transaction_date from master_txn_table where customers = \"Robert King\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 10441, "SQL": "select transaction_id from master_txn_table where product_service = \"Dairy\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 10442, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Jonathan Molina' or vendor = 'Jonathan Molina'" }, { "id": 10443, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') order by sum(debit) desc limit 1" }, { "id": 10444, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Manufacturing industrial organic gases\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 10445, "SQL": "select transaction_date from master_txn_table where customers = \"Shawn Bowers\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 10446, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Erik Stevenson\" ) " }, { "id": 10447, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 10448, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 10449, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 10450, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Recognition software for government and legal purposes\") and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 10451, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Ryan Valentine\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 10452, "SQL": "select transaction_date from master_txn_table where customers = \"Kurt Martinez\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 10453, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jennifer Solomon\" ) " }, { "id": 10454, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jamie Ibarra\"" }, { "id": 10455, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Terry Manning\" order by transaction_date limit 1" }, { "id": 10456, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Amy Myers\" ) " }, { "id": 10457, "SQL": "select transaction_date from master_txn_table where customers = \"Kevin Price\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 10458, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Youth community center services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 10459, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Toni Moran\"" }, { "id": 10460, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 10461, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 10462, "SQL": "select transaction_id from master_txn_table where product_service = \"Coffee and Snack\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 10463, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Carolyn Hunter\" ) " }, { "id": 10464, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Drain cleaning\") and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 10465, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 10466, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 10467, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Justin Klein\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 10468, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Legal & Professional Fees\") and vendor = \"Erin Wilson\"" }, { "id": 10469, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Patrick Gonzalez\" ) " }, { "id": 10470, "SQL": "select min(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 = \"Rebecca Black\" and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 10471, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 10472, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"IT and telecommunication\" " }, { "id": 10473, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') group by product_service order by sum(credit) desc limit 1" }, { "id": 10474, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 10475, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Dean Gross\" ) " }, { "id": 10476, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Carol Figueroa\" ) " }, { "id": 10477, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Locomotives\" " }, { "id": 10478, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 10479, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 10480, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Jeremy Gibson\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 10481, "SQL": "select transaction_id from master_txn_table where product_service = \"Distressed Securities\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 10482, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Surveying wells\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 10483, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Derrick Hobbs\" ) " }, { "id": 10484, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Blueprinting services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 10485, "SQL": "select transaction_date 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 = \"Dance\" order by transaction_date asc limit 1 " }, { "id": 10486, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' 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') " }, { "id": 10487, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'William Moyer' or vendor = 'William Moyer'" }, { "id": 10488, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jake Nguyen\" ) " }, { "id": 10489, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"David Santos\" and transaction_type = 'payment' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') ) " }, { "id": 10490, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jake Bowers\" ) " }, { "id": 10491, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Erin Shelton' or vendor = 'Erin Shelton'" }, { "id": 10492, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Providing other outdoor maintenance services\" " }, { "id": 10493, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"golf instruction services\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 10494, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 10495, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Katherine Flores\" ) " }, { "id": 10496, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 10497, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Lee Beard\"" }, { "id": 10498, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sheri Rivera\" ) " }, { "id": 10499, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Lori Berry\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 10500, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)group by product_service order by sum(credit) desc limit 1" }, { "id": 10501, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Matthew Flores\" order by transaction_date limit 1" }, { "id": 10502, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Unapplied Cash Bill Payment Expense\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 10503, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jennifer Webster\" order by transaction_date limit 1" }, { "id": 10504, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Job Expenses\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 10505, "SQL": "select transaction_date 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 = \"Parking lot and driveway washing\" order by transaction_date asc limit 1 " }, { "id": 10506, "SQL": "select transaction_date from master_txn_table where customers = \"Charles Kim\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 10507, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Eric Chambers\" order by transaction_date limit 1" }, { "id": 10508, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Nathan Morrison\"" }, { "id": 10509, "SQL": "select transaction_date from master_txn_table where customers = \"Billy Woodard\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 10510, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Rent or Lease\") and vendor = \"Kim Cook\"" }, { "id": 10511, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Boarding services\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 10512, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Scott Savage\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 10513, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 10514, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Job Materials\") and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 10515, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Selena Horton\" ) " }, { "id": 10516, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 10517, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Nicole Cook\" order by transaction_date limit 1" }, { "id": 10518, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Annette Lawrence\" order by transaction_date limit 1" }, { "id": 10519, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ronald Molina\" ) " }, { "id": 10520, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jonathan Mitchell IV\" ) " }, { "id": 10521, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Samantha Berry\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 10522, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Jessica Rogers\"" }, { "id": 10523, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jermaine Green\" ) " }, { "id": 10524, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 10525, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Fast food restaurants\") and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 10526, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Ross Clark\" order by transaction_date limit 1" }, { "id": 10527, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"William Stone\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) )" }, { "id": 10528, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Brittany Marquez\"" }, { "id": 10529, "SQL": "select transaction_id from master_txn_table where customers = \"Adam Leonard\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 10530, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Tina Haynes\" ) " }, { "id": 10531, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Danielle Roy\" and transaction_type = 'invoice'" }, { "id": 10532, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Tara Booker\" ) " }, { "id": 10533, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Rebecca Velez\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 10534, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Kimberly Roberts\" and transaction_type = 'invoice'" }, { "id": 10535, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Kylie Collier\" order by transaction_date limit 1" }, { "id": 10536, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Michele Thomas\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 10537, "SQL": "select transaction_id from master_txn_table where product_service = \"Musical\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 10538, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 10539, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Michelle Gonzales\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 10540, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Therapeutic services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 10541, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Linda Green\" ) " }, { "id": 10542, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Alyssa Logan' or vendor = 'Alyssa Logan'" }, { "id": 10543, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Cristina Obrien\" ) " }, { "id": 10544, "SQL": "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,\"Ethical Hacking Training\") and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 10545, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 10546, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 10547, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 10548, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Elizabeth Golden\"" }, { "id": 10549, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Christine Austin\" ) " }, { "id": 10550, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 10551, "SQL": "select transaction_date 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 = \"Entertainment\" order by transaction_date asc limit 1 " }, { "id": 10552, "SQL": "select transaction_id from master_txn_table where product_service = \"Attire and accessories\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 10553, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 10554, "SQL": "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,\"Forestry and logging machinery and equipment rental or leasing\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 10555, "SQL": "select transaction_id from master_txn_table where product_service = \"Musical\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 10556, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 10557, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Eric Jones\"" }, { "id": 10558, "SQL": "select sum(credit) from master_txn_table where product_service = \"Car seats\" and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 10559, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Providing classes in stenography and court reporting\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 10560, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Gregory Walker\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 10561, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Debra Hernandez\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 10562, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Rebecca Franklin\" ) " }, { "id": 10563, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Railroad switching\" " }, { "id": 10564, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Amusement and recreation services\") 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') " }, { "id": 10565, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Car seats\" " }, { "id": 10566, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Leslie Gonzalez\" ) " }, { "id": 10567, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 10568, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ashley Murray\" ) " }, { "id": 10569, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 10570, "SQL": "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,\"Retailing home office furniture\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 10571, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jack Jones\" ) " }, { "id": 10572, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Job Materials\") and vendor = \"Bryan Davis\"" }, { "id": 10573, "SQL": "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,\"Ethical Hacking Training\") and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 10574, "SQL": "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\") and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 10575, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Child guidance services\") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 10576, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Carla Phillips\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 10577, "SQL": "select transaction_date from master_txn_table where customers = \"Anita Herring\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 10578, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 10579, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Bookkeeper\") and vendor = \"Sarah Foster\"" }, { "id": 10580, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Stephen Ramirez\" ) " }, { "id": 10581, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Daisy Delacruz\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 10582, "SQL": "select transaction_id from master_txn_table where product_service = \"Railcar\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 10583, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Melanie Ellis\" ) " }, { "id": 10584, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Equipment Rental\") and vendor = \"Jordan Woodward\"" }, { "id": 10585, "SQL": "select transaction_id from master_txn_table where customers = \"Kimberly Kennedy\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 10586, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"David Arias\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') ) " }, { "id": 10587, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Katherine Wilkinson\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 10588, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Daniel Little\" ) " }, { "id": 10589, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Patricia Peterson\" order by transaction_date limit 1" }, { "id": 10590, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Gabriel Gordon\"" }, { "id": 10591, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Sara Miller\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) ) " }, { "id": 10592, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Kelly Murphy\"" }, { "id": 10593, "SQL": "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,\"Process management\") and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 10594, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"John Oneill\" ) " }, { "id": 10595, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jonathan Hayes\" order by transaction_date limit 1" }, { "id": 10596, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Nancy Morton\" and account_type in ('Expense','Other Expense') and 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') " }, { "id": 10597, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Youth community center services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 10598, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') group by product_service order by sum(credit) desc limit 1" }, { "id": 10599, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Timothy Perry\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") )" }, { "id": 10600, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Michael Vaughn\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 10601, "SQL": "select transaction_date 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 = \"Data processing computer\" order by transaction_date asc limit 1 " }, { "id": 10602, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Margaret Simon\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 10603, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 10604, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') and account_type in ('Expense','Other Expense') " }, { "id": 10605, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Decks and Patios\") and vendor = \"Elizabeth Golden\"" }, { "id": 10606, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jason Forbes\" ) " }, { "id": 10607, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Brooke Wright\" order by transaction_date limit 1" }, { "id": 10608, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 10609, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Jennifer Rose\" and account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 10610, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Carolyn Wang\" ) " }, { "id": 10611, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Sarah Novak\"" }, { "id": 10612, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Thomas Walker\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 10613, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Megan Thompson\" and transaction_type = 'invoice'" }, { "id": 10614, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 10615, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Construction management\" " }, { "id": 10616, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 10617, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Locomotives\" " }, { "id": 10618, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Julia Scott\" ) " }, { "id": 10619, "SQL": "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 financial investment management services\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 10620, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Richard Ayala\" ) " }, { "id": 10621, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Wholesaling locomotives\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 10622, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Daniel Campbell\" order by transaction_date limit 1" }, { "id": 10623, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Memberships\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 10624, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 10625, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 10626, "SQL": "select transaction_date 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 = \"Business management\" order by transaction_date asc limit 1 " }, { "id": 10627, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Travis Chaney\"" }, { "id": 10628, "SQL": "select sum(credit) from master_txn_table where product_service = \"Self-help programs\" and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 10629, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 10630, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') group by billing_city" }, { "id": 10631, "SQL": "select transaction_date 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 = \"Snow removal services\" order by transaction_date asc limit 1 " }, { "id": 10632, "SQL": "select transaction_date from master_txn_table where customers = \"Michael Phillips\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 10633, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 10634, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Margaret Mcknight\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') )" }, { "id": 10635, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Chimney sweep services\") and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 10636, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Michael Fuentes\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') ) " }, { "id": 10637, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 10638, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Michael Oconnor\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 10639, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Paul Hudson\" ) " }, { "id": 10640, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 10641, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Brian Velez\" order by transaction_date limit 1" }, { "id": 10642, "SQL": "select sum(credit) from master_txn_table where product_service = \"Games\" and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 10643, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 10644, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 10645, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Janet Hammond\" ) " }, { "id": 10646, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Printing\" " }, { "id": 10647, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 10648, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jon Dunn\" ) " }, { "id": 10649, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jessica Oconnell\" order by transaction_date limit 1" }, { "id": 10650, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date) AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 10651, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Providing independent operation of railroad terminals\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 10652, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Drain cleaning\") and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 10653, "SQL": "select transaction_id from master_txn_table where product_service = \"Carriers\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 10654, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 10655, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Ashley Mejia\" order by transaction_date limit 1" }, { "id": 10656, "SQL": "select transaction_id from master_txn_table where product_service = \"Orange oil\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 10657, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Ronald Riley\" order by transaction_date limit 1" }, { "id": 10658, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Glenn Boyer\" ) " }, { "id": 10659, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Terri Allison\" ) " }, { "id": 10660, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ryan Brown\" ) " }, { "id": 10661, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Sheena Carrillo\" and transaction_type = 'invoice'" }, { "id": 10662, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 10663, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') order by sum(debit) desc limit 1" }, { "id": 10664, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Database management\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 10665, "SQL": "select transaction_id from master_txn_table where customers = \"Maria Lee\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 10666, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Julie Cook\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 10667, "SQL": "select transaction_date 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 = \"Helium\" order by transaction_date asc limit 1 " }, { "id": 10668, "SQL": "select transaction_date 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 = \"Postal\" order by transaction_date asc limit 1 " }, { "id": 10669, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Christine Barrett\" and transaction_type = 'invoice'" }, { "id": 10670, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Evelyn Gonzales\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') )" }, { "id": 10671, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Joseph Schwartz\" order by transaction_date limit 1" }, { "id": 10672, "SQL": "select max(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 = \"Andrew Salas\" and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 10673, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Baby carriers\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 10674, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 10675, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Quality management assessment\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 10676, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Offering equity long/short \") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 10677, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 10678, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 10679, "SQL": "select transaction_date from master_txn_table where customers = \"Matthew Jordan\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 10680, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Providing personal care\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 10681, "SQL": "select transaction_id from master_txn_table where customers = \"Gregory Miles\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 10682, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Spraying services\") and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 10683, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Home-care\" " }, { "id": 10684, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 10685, "SQL": "select min(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 = \"Dominique Farrell\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 10686, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 10687, "SQL": "select sum(credit) from master_txn_table where product_service = \"Application Hosting\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 10688, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 10689, "SQL": "select transaction_date 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 = \"Auto mobiles\" order by transaction_date asc limit 1 " }, { "id": 10690, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Private mailbox rental services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 10691, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Alexandra Andrews\" and transaction_type = 'invoice'" }, { "id": 10692, "SQL": "select transaction_date from master_txn_table where customers = \"Kevin Kramer\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 10693, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Scott Patterson\" ) " }, { "id": 10694, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') order by sum(debit) desc limit 1" }, { "id": 10695, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 10696, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Diana King\"" }, { "id": 10697, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Judy Hansen\"" }, { "id": 10698, "SQL": "select transaction_date from master_txn_table where customers = \"Mary Ibarra\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 10699, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Michael Ryan\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") ) " }, { "id": 10700, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Pool maintenance\") and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 10701, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Martin Thomas\" and account_type in ('Expense','Other Expense') and 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') " }, { "id": 10702, "SQL": "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,\"Aircraft rental or leasing\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 10703, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Keith Osborne\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 10704, "SQL": "select transaction_date 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 = \"Trust and Fiduciary\" order by transaction_date asc limit 1 " }, { "id": 10705, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 10706, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 10707, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Adam Murphy\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 10708, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Angela Alexander\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 10709, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Providing classes in stenography and court reporting\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 10710, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') order by sum(debit) desc limit 1" }, { "id": 10711, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Recognition software for IT and telecommunications\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 10712, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Alexis Olson\" ) " }, { "id": 10713, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 10714, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Melissa Jackson\" ) " }, { "id": 10715, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 10716, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Jorge Winters\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) )" }, { "id": 10717, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Cynthia Roberts' or vendor = 'Cynthia Roberts'" }, { "id": 10718, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Hailey Nash\" and transaction_type = 'invoice'" }, { "id": 10719, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Bryan Petersen\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) ) " }, { "id": 10720, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Danielle Swanson\" ) " }, { "id": 10721, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Tommy White\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 10722, "SQL": "select transaction_id from master_txn_table where product_service = \"Tournaments and Matches\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 10723, "SQL": "select transaction_id from master_txn_table where customers = \"Breanna Smith\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 10724, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Victoria Hart\" order by transaction_date limit 1" }, { "id": 10725, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Lindsay Stevens' or vendor = 'Lindsay Stevens'" }, { "id": 10726, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 10727, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Bicycle retailing\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 10728, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 10729, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Bridget Lowe\" ) " }, { "id": 10730, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Howard Leon\" ) " }, { "id": 10731, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lauren Edwards\" ) " }, { "id": 10732, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') and account_type in ('Expense','Other Expense') " }, { "id": 10733, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Holly Lane\" ) " }, { "id": 10734, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Derek Meza\" ) " }, { "id": 10735, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Henry Diaz\" and account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 10736, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 10737, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Insurance\") and vendor = \"William Mcfarland\"" }, { "id": 10738, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Elizabeth Carson\" ) " }, { "id": 10739, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 10740, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Bradley James\" ) " }, { "id": 10741, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Deanna Brady\" ) " }, { "id": 10742, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Seth Savage\" ) " }, { "id": 10743, "SQL": "select transaction_id from master_txn_table where product_service = \"Mailbox Services\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 10744, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Angela Crane\" ) " }, { "id": 10745, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 10746, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Samuel Wright\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 10747, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 10748, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 10749, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Rick Rowe\"" }, { "id": 10750, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Taxes & Licenses\") and vendor = \"Cheryl Calderon\"" }, { "id": 10751, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Juan Castro\"" }, { "id": 10752, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Austin Bennett\" ) " }, { "id": 10753, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 10754, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ryan Luna\" ) " }, { "id": 10755, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 10756, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Nathan Hill\" ) " }, { "id": 10757, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date) AND date(current_date) group by billing_city" }, { "id": 10758, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Herbert Williams\" ) " }, { "id": 10759, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Susan Williamson\" ) " }, { "id": 10760, "SQL": "select transaction_date from master_txn_table where customers = \"Cody Richards\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 10761, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Patricia Harrington\" ) " }, { "id": 10762, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 10763, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 10764, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Therapeutic services\") and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 10765, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 10766, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 10767, "SQL": "select transaction_date from master_txn_table where customers = \"Zachary Diaz\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 10768, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 10769, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Tanker\" " }, { "id": 10770, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Seth Bradford\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 10771, "SQL": "select sum(credit) from master_txn_table where product_service = \"Financial\" and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 10772, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Child abuse prevention services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 10773, "SQL": "select transaction_date 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 = \"Home office\" order by transaction_date asc limit 1 " }, { "id": 10774, "SQL": "select transaction_date 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 = \"Diving\" order by transaction_date asc limit 1 " }, { "id": 10775, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Hannah Bailey\" ) " }, { "id": 10776, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Mary Leon\"" }, { "id": 10777, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jacob Rodriguez\" ) " }, { "id": 10778, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') group by billing_city" }, { "id": 10779, "SQL": "select transaction_id from master_txn_table where product_service = \"Chairs\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 10780, "SQL": "select transaction_id from master_txn_table where customers = \"Robert Fox\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 10781, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Edward Jones\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) )" }, { "id": 10782, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Computer Repairs\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 10783, "SQL": "select transaction_date 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 = \"Mining machinery\" order by transaction_date asc limit 1 " }, { "id": 10784, "SQL": "select max(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 = \"Robert Ramos\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 10785, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Sandy Harper\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) ) " }, { "id": 10786, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kathleen Lyons\" ) " }, { "id": 10787, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Recreational programs\" " }, { "id": 10788, "SQL": "select max(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 = \"Sherry Drake\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 10789, "SQL": "select transaction_id from master_txn_table where customers = \"Leslie Davies\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 10790, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sarah Howard\" ) " }, { "id": 10791, "SQL": "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 aeronautical equipment and supplies\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 10792, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Maria Gonzalez\" ) " }, { "id": 10793, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Commodity Markets\" " }, { "id": 10794, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) group by billing_city" }, { "id": 10795, "SQL": "select transaction_date from master_txn_table where customers = \"Stacy Stewart\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 10796, "SQL": "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 = \"Renee Ford\" and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 10797, "SQL": "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 navigational instruments (except electronic)\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 10798, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"John Solomon PhD\" ) " }, { "id": 10799, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Victoria Navarro\" order by transaction_date limit 1" }, { "id": 10800, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 10801, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 10802, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 10803, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Marie Price\" ) " }, { "id": 10804, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 10805, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Equipment Rental\") and vendor = \"Alejandro Adams\"" }, { "id": 10806, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Annette Smith\" ) " }, { "id": 10807, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Michaela Mann\"" }, { "id": 10808, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 10809, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 10810, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Rachel Patton\" and transaction_type = 'payment' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') ) " }, { "id": 10811, "SQL": "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,\"Daily living assistance\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 10812, "SQL": "select transaction_date 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 = \"Assessing product problems\" order by transaction_date asc limit 1 " }, { "id": 10813, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Karen Parker\" ) " }, { "id": 10814, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Providing trust and fiduciary services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 10815, "SQL": "select transaction_id from master_txn_table where customers = \"Paul Owens\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 10816, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Musicians\" " }, { "id": 10817, "SQL": "select transaction_id from master_txn_table where product_service = \"Distressed Securities\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 10818, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 10819, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 10820, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Suzanne Pham\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 10821, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Marc Stephenson\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 10822, "SQL": "select max(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 = \"Yolanda Washington\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 10823, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Julian Wilson\"" }, { "id": 10824, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Flowers\") and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 10825, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Judy Le\" ) " }, { "id": 10826, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Manufacturing spearmint oil\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 10827, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 10828, "SQL": "select transaction_date 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 = \"Mailbox Services\" order by transaction_date asc limit 1 " }, { "id": 10829, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Carla Martin\" ) " }, { "id": 10830, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Megan Glenn\"" }, { "id": 10831, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Nancy Douglas\" ) " }, { "id": 10832, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 10833, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Samantha Mitchell\"" }, { "id": 10834, "SQL": "select max(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 = \"Charles Wyatt\" and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 10835, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 10836, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Logan Hughes\" order by transaction_date limit 1" }, { "id": 10837, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 10838, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') order by sum(debit) desc limit 1" }, { "id": 10839, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Amateur sports teams and club servcies\") and 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') " }, { "id": 10840, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Christina Murphy\" ) " }, { "id": 10841, "SQL": "select transaction_id from master_txn_table where customers = \"Eileen Mendez\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 10842, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Ashley Golden\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') ) " }, { "id": 10843, "SQL": "select transaction_date from master_txn_table where customers = \"Amy Brown\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 10844, "SQL": "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,\"Swimming pool Cleaning\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 10845, "SQL": "select max(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 = \"Ryan Mays\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 10846, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Hector Black\" ) " }, { "id": 10847, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 10848, "SQL": "select transaction_date from master_txn_table where customers = \"Allison Haynes\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 10849, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 10850, "SQL": "select transaction_date from master_txn_table where customers = \"Jacqueline Henry\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 10851, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Desiree Bush\" ) " }, { "id": 10852, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Justin Taylor\" order by transaction_date limit 1" }, { "id": 10853, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Brandon Soto\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 10854, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 10855, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 10856, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Beth Warren\" ) " }, { "id": 10857, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Theresa Thornton\" ) " }, { "id": 10858, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Morgan Carroll\"" }, { "id": 10859, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Emily Soto\"" }, { "id": 10860, "SQL": "select transaction_date from master_txn_table where customers = \"Janice Spencer\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 10861, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Lauren Brown\"" }, { "id": 10862, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') group by billing_city" }, { "id": 10863, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sierra Morrow DVM\" ) " }, { "id": 10864, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Emily Potter\" and transaction_type = 'invoice'" }, { "id": 10865, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 10866, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Shannon Hunter\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) ) " }, { "id": 10867, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"James Zamora\" ) " }, { "id": 10868, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Other nonfossil-fuel power generation\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 10869, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Charles Fields\" and transaction_type = 'invoice'" }, { "id": 10870, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Dues & Subscriptions\") and vendor = \"Monica Weaver\"" }, { "id": 10871, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Tanya Robinson\" order by transaction_date limit 1" }, { "id": 10872, "SQL": "select transaction_id from master_txn_table where product_service = \"Mailbox Services\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 10873, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) group by billing_city" }, { "id": 10874, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Alexander Baker\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 10875, "SQL": "select transaction_date 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 = \"Voice & Speech Recognition\" order by transaction_date asc limit 1 " }, { "id": 10876, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 10877, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Disposal Fees\") and vendor = \"Ronald Tucker\"" }, { "id": 10878, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 10879, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Francis Wong\" ) " }, { "id": 10880, "SQL": "select transaction_id from master_txn_table where product_service = \"Packaging and labeling\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 10881, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 10882, "SQL": "select transaction_id from master_txn_table where customers = \"William Holmes\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 10883, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"William Elliott\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) ) " }, { "id": 10884, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 10885, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') and account_type in ('Expense','Other Expense') " }, { "id": 10886, "SQL": "select transaction_date 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\" order by transaction_date asc limit 1 " }, { "id": 10887, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Christopher Mathis\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 10888, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 10889, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jamie Smith\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 10890, "SQL": "select sum(credit) from master_txn_table where product_service = \"Aeronautical Equipment\" and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 10891, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Basic office and secretarial skills training\") 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') " }, { "id": 10892, "SQL": "select transaction_id from master_txn_table where customers = \"Michael Hartman\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 10893, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 10894, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Steven Bennett\" and transaction_type = 'payment' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') )" }, { "id": 10895, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Baby apparel and shoes\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 10896, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 10897, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Taylor Dominguez\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') )" }, { "id": 10898, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Gregory Newton\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') )" }, { "id": 10899, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Nicholas Thompson\" ) " }, { "id": 10900, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 10901, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Dawn Roman\" ) " }, { "id": 10902, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Todd Moon\" ) " }, { "id": 10903, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Bryan Price\" ) " }, { "id": 10904, "SQL": "select transaction_date 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 = \"Peppermint oil\" order by transaction_date asc limit 1 " }, { "id": 10905, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 10906, "SQL": "select transaction_date 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 = \"Environmental impact assessment\" order by transaction_date asc limit 1 " }, { "id": 10907, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' 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') " }, { "id": 10908, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Bryan Peters\" ) " }, { "id": 10909, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Labor\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 10910, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Mark Moreno\" ) " }, { "id": 10911, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 10912, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 10913, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Isabella Ford\" ) " }, { "id": 10914, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") group by product_service order by sum(credit) desc limit 1" }, { "id": 10915, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') order by sum(debit) desc limit 1" }, { "id": 10916, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 10917, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Malik Byrd\"" }, { "id": 10918, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Christine Greene\" ) " }, { "id": 10919, "SQL": "select min(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 = \"Courtney Newman\" 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') " }, { "id": 10920, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 10921, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Mia Sanchez\" order by transaction_date limit 1" }, { "id": 10922, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Douglas Pierce\" and transaction_type = 'invoice'" }, { "id": 10923, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Tommy Martin\" ) " }, { "id": 10924, "SQL": "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,\"golf courses and country clubs\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 10925, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 10926, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 10927, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 10928, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Maurice Petersen\" and transaction_type = 'invoice'" }, { "id": 10929, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 10930, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 10931, "SQL": "select transaction_id from master_txn_table where customers = \"Johnathan Gay\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 10932, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Michele Newman' or vendor = 'Michele Newman'" }, { "id": 10933, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Industrial manufacturing\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 10934, "SQL": "select transaction_date from master_txn_table where customers = \"Kimberly Knapp\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 10935, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where 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') and account_type in ('Expense','Other Expense') " }, { "id": 10936, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Eric Brooks\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 10937, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Lori Rodriguez\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 10938, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Whitney Fletcher\" ) " }, { "id": 10939, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Amanda Chapman' or vendor = 'Amanda Chapman'" }, { "id": 10940, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Becky Price\" and transaction_type = 'invoice'" }, { "id": 10941, "SQL": "select sum(credit) from master_txn_table where product_service = \"Citronella oil\" and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 10942, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Monica Evans\" ) " }, { "id": 10943, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Retailing Wardrobe\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 10944, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"William Alvarez\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) )" }, { "id": 10945, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Sarah Conner\"" }, { "id": 10946, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 10947, "SQL": "select transaction_id from master_txn_table where customers = \"Brittany Walton\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 10948, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Guy Francis\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) ) " }, { "id": 10949, "SQL": "select sum(credit) from master_txn_table where product_service = \"Railroad Cars\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 10950, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Teresa Contreras' or vendor = 'Teresa Contreras'" }, { "id": 10951, "SQL": "select transaction_date from master_txn_table where customers = \"Brittany Christensen\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 10952, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 10953, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 10954, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 10955, "SQL": "select sum(credit) from master_txn_table where product_service = \"LAN\" and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 10956, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Metal ore exploration\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 10957, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Savings\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 10958, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Meredith Perez\" and transaction_type = 'invoice'" }, { "id": 10959, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Leah Davies\" order by transaction_date limit 1" }, { "id": 10960, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Samuel Adams\" and account_type in ('Expense','Other Expense') and 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') " }, { "id": 10961, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Ronald Ramos\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 10962, "SQL": "select transaction_date from master_txn_table where customers = \"Teresa Beltran\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 10963, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Belinda Gutierrez\" ) " }, { "id": 10964, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Perforating well casings\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 10965, "SQL": "select transaction_date 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 = \"Coordinators\" order by transaction_date asc limit 1 " }, { "id": 10966, "SQL": "select transaction_date from master_txn_table where customers = \"Gina Burton\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 10967, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Exercise\" " }, { "id": 10968, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") group by billing_city" }, { "id": 10969, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 10970, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Mary May\" and transaction_type = 'payment' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') )" }, { "id": 10971, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 10972, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 10973, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Kathleen Jackson\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') ) " }, { "id": 10974, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 10975, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 10976, "SQL": "select min(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 = \"Robert Reid\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 10977, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 10978, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') group by billing_city" }, { "id": 10979, "SQL": "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,\"Local area network management training\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 10980, "SQL": "select transaction_id from master_txn_table where customers = \"Alicia Houston\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 10981, "SQL": "select transaction_id from master_txn_table where customers = \"Paul Castro\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 10982, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 10983, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sean Bush\" ) " }, { "id": 10984, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 10985, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 10986, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Valerie Phillips\" ) " }, { "id": 10987, "SQL": "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,\"Offering macro funds\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 10988, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sheila Evans\" ) " }, { "id": 10989, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Geothermal-fueled power generation\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 10990, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Patrick Lewis\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 10991, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Tonya Oconnor\"" }, { "id": 10992, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Michael Barr\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 10993, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Kevin Clark\" order by transaction_date limit 1" }, { "id": 10994, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') group by billing_city" }, { "id": 10995, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Shunting trailers\" " }, { "id": 10996, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kayla Hodges\" ) " }, { "id": 10997, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 10998, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kevin Harper\" ) " }, { "id": 10999, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 11000, "SQL": "select transaction_date from master_txn_table where customers = \"Katie Nelson\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 11001, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Advertising\") and vendor = \"Michael Brown\"" }, { "id": 11002, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 11003, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 11004, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 11005, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Holly Horn\" ) " }, { "id": 11006, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Michelle Smith\" ) " }, { "id": 11007, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"David Lee\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 11008, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Jeffrey Fitzpatrick\"" }, { "id": 11009, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Joel Scott\" order by transaction_date limit 1" }, { "id": 11010, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Transportation\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 11011, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Eric Dawson\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 11012, "SQL": "select transaction_date from master_txn_table where customers = \"Donna Shah\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 11013, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Joshua Schwartz\" ) " }, { "id": 11014, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Erin Keller\" ) " }, { "id": 11015, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 11016, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kyle Johnston\" ) " }, { "id": 11017, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') group by billing_city" }, { "id": 11018, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Amy Haynes\" ) " }, { "id": 11019, "SQL": "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,\"Development of software products for automobiles\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 11020, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jeffrey Holt\" ) " }, { "id": 11021, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kurt Strickland\" ) " }, { "id": 11022, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) group by billing_city" }, { "id": 11023, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Russell Combs\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 11024, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Popular music shows\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 11025, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Window washing\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 11026, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 11027, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Mary Coleman\" ) " }, { "id": 11028, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Patricia Porter\" ) " }, { "id": 11029, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Tina Turner\" ) " }, { "id": 11030, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 11031, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Joan Reid\" ) " }, { "id": 11032, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Nancy Villanueva\" ) " }, { "id": 11033, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by billing_city" }, { "id": 11034, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 11035, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Brittany Brown\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 11036, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jamie Dawson\" ) " }, { "id": 11037, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Office Expenses\") and vendor = \"Emily Chang\"" }, { "id": 11038, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 11039, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 11040, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 11041, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Unapplied Cash Bill Payment Expense\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 11042, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Lisa Gonzales\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 11043, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 11044, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 11045, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 11046, "SQL": "select transaction_date 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 = \"Equity long bias\" order by transaction_date asc limit 1 " }, { "id": 11047, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Scott Lopez\"" }, { "id": 11048, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Cost of Labor\") and vendor = \"Courtney King\"" }, { "id": 11049, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jessica Simmons\" ) " }, { "id": 11050, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Hannah Downs\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 11051, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Becky Larsen\" ) " }, { "id": 11052, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"James Love\" ) " }, { "id": 11053, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Blueprinting services\") and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 11054, "SQL": "select transaction_date from master_txn_table where customers = \"William Gaines\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 11055, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 11056, "SQL": "select transaction_date from master_txn_table where customers = \"Gabrielle Castillo\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 11057, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Environmental impact assessment\" " }, { "id": 11058, "SQL": "select transaction_id from master_txn_table where product_service = \"Printing\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 11059, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 11060, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Richard Lopez III\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) )" }, { "id": 11061, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Johnathan Payne\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 11062, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Victoria Maxwell\" and transaction_type = 'invoice'" }, { "id": 11063, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Melissa Odonnell\" order by transaction_date limit 1" }, { "id": 11064, "SQL": "select transaction_date 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 = \"IT and telecommunication\" order by transaction_date asc limit 1 " }, { "id": 11065, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Clinton Holmes\" and transaction_type = 'invoice'" }, { "id": 11066, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Recognition software for healthcare\") 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') " }, { "id": 11067, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Providing freight car cleaning services\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 11068, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 11069, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Timothy Miles\" ) " }, { "id": 11070, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Travel Meals\") and vendor = \"Janice Lopez\"" }, { "id": 11071, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 11072, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Mindy Flores\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") ) " }, { "id": 11073, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 11074, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Donald Wall\" order by transaction_date limit 1" }, { "id": 11075, "SQL": "select transaction_id from master_txn_table where customers = \"Carlos Lynch\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 11076, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Kimberly Bautista\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 11077, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 11078, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 11079, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Decks and Patios\") and vendor = \"Daniel Davis\"" }, { "id": 11080, "SQL": "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 eucalyptus oil\") and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 11081, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Nicole Williams\" ) " }, { "id": 11082, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lisa Hardin\" ) " }, { "id": 11083, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 11084, "SQL": "select transaction_id from master_txn_table where customers = \"Crystal Ray\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 11085, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Lee Perez\"" }, { "id": 11086, "SQL": "select transaction_date from master_txn_table where customers = \"Veronica Rodriguez\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 11087, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 11088, "SQL": "select transaction_id from master_txn_table where product_service = \"Spraying\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 11089, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Chad Bishop\" ) " }, { "id": 11090, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Popular music shows\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 11091, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Providing railroad switching services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 11092, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') group by billing_city" }, { "id": 11093, "SQL": "select transaction_id from master_txn_table where customers = \"Gregory Suarez\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 11094, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Equipment Rental\") and vendor = \"Raymond Phillips\"" }, { "id": 11095, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Anthony Cummings\" ) " }, { "id": 11096, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Disposal Fees\") and vendor = \"Jonathan Galvan PhD\"" }, { "id": 11097, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Dominique Scott\" ) " }, { "id": 11098, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Matthew Contreras\" ) " }, { "id": 11099, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 11100, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Heather Walls\" ) " }, { "id": 11101, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Sara Clark\"" }, { "id": 11102, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 11103, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Multi-strategy\" " }, { "id": 11104, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Travel\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 11105, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Shawn Todd' or vendor = 'Shawn Todd'" }, { "id": 11106, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Carbon dioxide manufacturing\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 11107, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Industrial manufacturing\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 11108, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 11109, "SQL": "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,\"Retailing Chairs\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 11110, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Aaron Johnson\" order by transaction_date limit 1" }, { "id": 11111, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jeffrey Archer\" ) " }, { "id": 11112, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Frank Walker\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 11113, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Luke Rodriguez\" order by transaction_date limit 1" }, { "id": 11114, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Jose Obrien\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') ) " }, { "id": 11115, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 11116, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Theresa Johnson\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date) AND date(current_date) ) " }, { "id": 11117, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') and account_type in ('Expense','Other Expense') " }, { "id": 11118, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Daisy Davis' or vendor = 'Daisy Davis'" }, { "id": 11119, "SQL": "select sum(credit) from master_txn_table where product_service = \"Financial Investment\" and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 11120, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') group by product_service order by sum(credit) desc limit 1" }, { "id": 11121, "SQL": "select transaction_id from master_txn_table where customers = \"Wendy Hughes\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 11122, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Jessica Gallegos\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) ) " }, { "id": 11123, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Suzanne Cox\"" }, { "id": 11124, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 11125, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Ethical Hacking Training\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 11126, "SQL": "select transaction_id from master_txn_table where product_service = \"Swimming pool Cleaning\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 11127, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Abigail Rivera\" ) " }, { "id": 11128, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Louis Thomas\" ) " }, { "id": 11129, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Nicholas Chaney\" ) " }, { "id": 11130, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Doris Fischer\" order by transaction_date limit 1" }, { "id": 11131, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Kristen Carter\" order by transaction_date limit 1" }, { "id": 11132, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Equipment Repairs\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 11133, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 11134, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Fuel\") and vendor = \"Paul Mitchell\"" }, { "id": 11135, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Design and management services \") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 11136, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Dawn Roman\"" }, { "id": 11137, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 11138, "SQL": "select sum(credit) from master_txn_table where product_service = \"Ceremony & reception venue\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 11139, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Tyler White\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) )" }, { "id": 11140, "SQL": "select transaction_date from master_txn_table where customers = \"Sharon Guzman\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 11141, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Nicholas Wright\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 11142, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Joseph Cox\" ) " }, { "id": 11143, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lori Blake\" ) " }, { "id": 11144, "SQL": "select transaction_date from master_txn_table where customers = \"Johnny Knox\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 11145, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 11146, "SQL": "select transaction_date 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 = \"Party favors\" order by transaction_date asc limit 1 " }, { "id": 11147, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 11148, "SQL": "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,\"Business services centers\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 11149, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Judith Mcbride' or vendor = 'Judith Mcbride'" }, { "id": 11150, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 11151, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Heidi Holt\" ) " }, { "id": 11152, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Service Provisioning\" " }, { "id": 11153, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Ethical Hacking Training\") and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 11154, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Cynthia Moon' or vendor = 'Cynthia Moon'" }, { "id": 11155, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Ricky Marquez\" and transaction_type = 'invoice'" }, { "id": 11156, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Dennis Peters\" ) " }, { "id": 11157, "SQL": "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,\"Rail transportation support and other products\") and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 11158, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 11159, "SQL": "select transaction_date from master_txn_table where customers = \"Jordan Sanchez\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 11160, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") and account_type in ('Expense','Other Expense') " }, { "id": 11161, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Cynthia Holloway\" ) " }, { "id": 11162, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 11163, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Raymond Schultz\" order by transaction_date limit 1" }, { "id": 11164, "SQL": "select transaction_date from master_txn_table where customers = \"Stanley Franklin\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 11165, "SQL": "select transaction_date from master_txn_table where customers = \"Christina Hansen\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 11166, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') group by billing_city" }, { "id": 11167, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Felicia Ryan\" and transaction_type = 'payment' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') ) " }, { "id": 11168, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Joseph Wolfe\" order by transaction_date limit 1" }, { "id": 11169, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 11170, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 11171, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"David Prince\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 11172, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Scott Ballard\" ) " }, { "id": 11173, "SQL": "select transaction_date from master_txn_table where customers = \"Vanessa Weaver\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 11174, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Andrew Walters\"" }, { "id": 11175, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jamie Hartman\"" }, { "id": 11176, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 11177, "SQL": "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,\"Uncategorized Expense\") 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') " }, { "id": 11178, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Catherine Johnson\" and transaction_type = 'payment' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') ) " }, { "id": 11179, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Kayla Hutchinson\"" }, { "id": 11180, "SQL": "select min(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 = \"Jessica Lin\" 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') " }, { "id": 11181, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Lori Berry\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 11182, "SQL": "select avg(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 = \"Renee Wood\" and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 11183, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lisa Matthews\" ) " }, { "id": 11184, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kenneth Contreras\" ) " }, { "id": 11185, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Michael Gibson\" ) " }, { "id": 11186, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brittany Ortiz\" ) " }, { "id": 11187, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Adoption placement services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 11188, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sergio Holder\" ) " }, { "id": 11189, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 11190, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 11191, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 11192, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 11193, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 11194, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Megan Miller\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 11195, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date) AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 11196, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Lee Adams\"" }, { "id": 11197, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Amanda King\"" }, { "id": 11198, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 11199, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Rodney Thomas\" ) " }, { "id": 11200, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Megan Richards\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 11201, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Douglas Graham\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 11202, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Exercise equipment retailing\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 11203, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 11204, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 11205, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by billing_city" }, { "id": 11206, "SQL": "select transaction_id from master_txn_table where customers = \"Patricia Mata\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 11207, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 11208, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Dorothy Paul\" ) " }, { "id": 11209, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 11210, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Maintenance and Repair\") and vendor = \"Dennis Hunter\"" }, { "id": 11211, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Eugene Combs\" ) " }, { "id": 11212, "SQL": "select transaction_id from master_txn_table where customers = \"Nicole Briggs\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 11213, "SQL": "select sum(credit) from master_txn_table where product_service = \"Clothing and footwear\" and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 11214, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Promotional\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 11215, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Bookkeeper\") and vendor = \"Stephanie Johnson\"" }, { "id": 11216, "SQL": "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,\"Cost of Labor\") and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 11217, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Justin Shea\" ) " }, { "id": 11218, "SQL": "select sum(credit) from master_txn_table where product_service = \"Macro\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 11219, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") order by sum(debit) desc limit 1" }, { "id": 11220, "SQL": "select min(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 = \"Cheyenne Lewis\" and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 11221, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 11222, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) group by billing_city" }, { "id": 11223, "SQL": "select transaction_date from master_txn_table where customers = \"Michael Walsh\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 11224, "SQL": "select transaction_id from master_txn_table where customers = \"Christian Kaufman\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 11225, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Diane Chang\" ) " }, { "id": 11226, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 11227, "SQL": "select avg(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 = \"Dylan Aguirre\" and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 11228, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Bryce Gibson\" order by transaction_date limit 1" }, { "id": 11229, "SQL": "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,\"Baby apparel and shoes\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 11230, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"David Blackburn\" ) " }, { "id": 11231, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 11232, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Shaun Trujillo\" ) " }, { "id": 11233, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Deanna Nixon\" ) " }, { "id": 11234, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 11235, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Justin Ferguson\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) )" }, { "id": 11236, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Jason Ewing\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 11237, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 11238, "SQL": "select transaction_id from master_txn_table where product_service = \"Daily living assistance\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 11239, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 11240, "SQL": "select max(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 = \"Lisa Rivera\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 11241, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 11242, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 11243, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brandi Matthews\" ) " }, { "id": 11244, "SQL": "select transaction_id from master_txn_table where customers = \"Christine Avila\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 11245, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 11246, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Steven Romero\" order by transaction_date limit 1" }, { "id": 11247, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kristy Simon\" ) " }, { "id": 11248, "SQL": "select transaction_date from master_txn_table where customers = \"Molly Kramer\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 11249, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 11250, "SQL": "select sum(credit) from master_txn_table where product_service = \"Nonfossil-fuel\" and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 11251, "SQL": "select transaction_date from master_txn_table where customers = \"Randy Rowland\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 11252, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Timothy Blevins\"" }, { "id": 11253, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 11254, "SQL": "select transaction_date from master_txn_table where customers = \"Bruce Taylor\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 11255, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Daniel Vasquez\"" }, { "id": 11256, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Alexander Baker\" and account_type in ('Expense','Other Expense') and 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') " }, { "id": 11257, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Eric Kim\" ) " }, { "id": 11258, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Richard Warren\" ) " }, { "id": 11259, "SQL": "select transaction_date from master_txn_table where customers = \"Patrick Myers\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 11260, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Erin Zavala\" ) " }, { "id": 11261, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Nancy Erickson\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 11262, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Megan Leonard\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 11263, "SQL": "select max(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 = \"Monica Dean\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 11264, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 11265, "SQL": "select transaction_id from master_txn_table where product_service = \"Railcar\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 11266, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") and account_type in ('Expense','Other Expense') " }, { "id": 11267, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jenna Mccormick\" ) " }, { "id": 11268, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Sheila Spence' or vendor = 'Sheila Spence'" }, { "id": 11269, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Laura Cisneros\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 11270, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Julie Thompson\"" }, { "id": 11271, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') group by billing_city" }, { "id": 11272, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 11273, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 11274, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Thomas Morris\" ) " }, { "id": 11275, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"David Allen\" and account_type in ('Expense','Other Expense') and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 11276, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Michelle George\" ) " }, { "id": 11277, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Window washing\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 11278, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Martin Campbell\" order by transaction_date limit 1" }, { "id": 11279, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 11280, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 11281, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date) AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 11282, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Invitations\" " }, { "id": 11283, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") group by product_service order by sum(credit) desc limit 1" }, { "id": 11284, "SQL": "select transaction_date 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 = \"Casings, Tubes and Rods\" order by transaction_date asc limit 1 " }, { "id": 11285, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 11286, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Thomas Gutierrez\"" }, { "id": 11287, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Matthew Zamora\" order by transaction_date limit 1" }, { "id": 11288, "SQL": "select min(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 = \"Heidi Tucker\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 11289, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 11290, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Bruce Kemp\" order by transaction_date limit 1" }, { "id": 11291, "SQL": "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,\"Duct and gutter cleaning\") and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 11292, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 11293, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Providing courses through business schools\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 11294, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Douglas Middleton\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 11295, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Richard Kelly\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 11296, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Carlos Powell\" ) " }, { "id": 11297, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jimmy Parker\" ) " }, { "id": 11298, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Krystal Hawkins\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') )" }, { "id": 11299, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Breeding\" " }, { "id": 11300, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Andrea Stephens\" ) " }, { "id": 11301, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') group by billing_city" }, { "id": 11302, "SQL": "select distinct transaction_id from master_txn_table where customers = \"John Glenn\"" }, { "id": 11303, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 11304, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Heather Ball\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 11305, "SQL": "select transaction_date from master_txn_table where customers = \"Emily Mora\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 11306, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 11307, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Amanda Stokes\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 11308, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)group by product_service order by sum(credit) desc limit 1" }, { "id": 11309, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Diving equipment retailing\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 11310, "SQL": "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\") and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 11311, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Kelsey Mcgrath\"" }, { "id": 11312, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Juan Jones\" ) " }, { "id": 11313, "SQL": "select transaction_date 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 = \"Hacking Training\" order by transaction_date asc limit 1 " }, { "id": 11314, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Anne Hunter\"" }, { "id": 11315, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Jeremiah Hill' or vendor = 'Jeremiah Hill'" }, { "id": 11316, "SQL": "select transaction_date from master_txn_table where customers = \"Melissa Bailey\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 11317, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') order by sum(debit) desc limit 1" }, { "id": 11318, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Frederick Lee\" ) " }, { "id": 11319, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Manufacturing industrial inorganic gases\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 11320, "SQL": "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,\"Wood- and wood waste-fueled power generation\") and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 11321, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"David Castro\"" }, { "id": 11322, "SQL": "select transaction_date 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 = \"Apparel and shoes\" order by transaction_date asc limit 1 " }, { "id": 11323, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Shannon Jones\" and account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 11324, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Michael Hardy\" ) " }, { "id": 11325, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 11326, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Parking lot and driveway washing\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 11327, "SQL": "select transaction_id from master_txn_table where customers = \"Zachary Holmes\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 11328, "SQL": "select transaction_id from master_txn_table where customers = \"Amanda Roth\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 11329, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Lindsey Cooley' or vendor = 'Lindsey Cooley'" }, { "id": 11330, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Heather Silva' or vendor = 'Heather Silva'" }, { "id": 11331, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Gloria Jackson\" and transaction_type = 'invoice'" }, { "id": 11332, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Alexis Edwards\" ) " }, { "id": 11333, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Michelle Thomas\" ) " }, { "id": 11334, "SQL": "select transaction_id from master_txn_table where customers = \"Michele Vance\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 11335, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Susan Alexander\" ) " }, { "id": 11336, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Home therapy services\") and 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') " }, { "id": 11337, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Katrina Hancock\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 11338, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Gary Byrd\"" }, { "id": 11339, "SQL": "select min(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 = \"Maureen Shah\" and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 11340, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Rebecca Murray\" ) " }, { "id": 11341, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 11342, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Vincent Escobar\"" }, { "id": 11343, "SQL": "select transaction_date 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 = \"Memberships\" order by transaction_date asc limit 1 " }, { "id": 11344, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Sylvia Hughes' or vendor = 'Sylvia Hughes'" }, { "id": 11345, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Thomas Velasquez\" ) " }, { "id": 11346, "SQL": "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,\"Social activities\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 11347, "SQL": "select sum(credit) from master_txn_table where product_service = \"Heavy construction equipment\" and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 11348, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Farrier services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 11349, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 11350, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') group by billing_city" }, { "id": 11351, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Joseph Stephens\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) )" }, { "id": 11352, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Emily Mcknight\" ) " }, { "id": 11353, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Daniel Gibbs\" ) " }, { "id": 11354, "SQL": "select min(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 = \"Susan Bryant\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 11355, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Danny Gonzalez\" order by transaction_date limit 1" }, { "id": 11356, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 11357, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 11358, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kyle Roman\" ) " }, { "id": 11359, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Trust and Fiduciary\" " }, { "id": 11360, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Alexandra Guerrero\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') ) " }, { "id": 11361, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Software Training\" " }, { "id": 11362, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 11363, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jonathon Solis\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 11364, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Benjamin Kim\"" }, { "id": 11365, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Elizabeth Curtis\"" }, { "id": 11366, "SQL": "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,\"Constructing apartment complexes\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 11367, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 11368, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"George Gordon\" ) " }, { "id": 11369, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Scott Farmer\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 11370, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Mailbox Services\" " }, { "id": 11371, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Dylan Burgess\" ) " }, { "id": 11372, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 11373, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 11374, "SQL": "select min(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 = \"Kevin Odom\" and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 11375, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 11376, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Natalie Thompson\" ) " }, { "id": 11377, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Building Repairs\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 11378, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') group by billing_city" }, { "id": 11379, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Thomas Glover\" ) " }, { "id": 11380, "SQL": "select avg(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 = \"Scott Foster\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 11381, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"David Odonnell\" ) " }, { "id": 11382, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 11383, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Michael Payne\" and transaction_type = 'invoice'" }, { "id": 11384, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 11385, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Erik Ward\" ) " }, { "id": 11386, "SQL": "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 processing\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 11387, "SQL": "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,\"Youth community center services\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 11388, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Providing homemaker and companion services\") and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 11389, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Christina Hinton\" ) " }, { "id": 11390, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Stuart Williams\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') ) " }, { "id": 11391, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Victoria Stanley\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 11392, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Sabrina Herrera' or vendor = 'Sabrina Herrera'" }, { "id": 11393, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Cheryl Hartman\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 11394, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Rebecca Wilkinson\" and transaction_type = 'invoice'" }, { "id": 11395, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 11396, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Computer Repairs\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 11397, "SQL": "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 = \"Alex Sherman\" and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 11398, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Christopher Alexander\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 11399, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Valerie Huynh\" ) " }, { "id": 11400, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 11401, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 11402, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kendra Pierce\" ) " }, { "id": 11403, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 11404, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jacqueline Lane\" ) " }, { "id": 11405, "SQL": "select sum(credit) from master_txn_table where product_service = \"Chimney sweep services\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 11406, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Albert Daniels\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) ) " }, { "id": 11407, "SQL": "select transaction_date from master_txn_table where customers = \"Curtis Martin\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 11408, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 11409, "SQL": "select transaction_id from master_txn_table where product_service = \"Peppermint oil\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 11410, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Anthony Sparks\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 11411, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Carolyn Ross\" ) " }, { "id": 11412, "SQL": "select transaction_date 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 = \"Hacking Training\" order by transaction_date asc limit 1 " }, { "id": 11413, "SQL": "select transaction_date from master_txn_table where customers = \"Julie Morales\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 11414, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 11415, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Stuart Santana\" ) " }, { "id": 11416, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date) AND date(current_date) group by billing_city" }, { "id": 11417, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Ashley Garza\" and transaction_type = 'payment' 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') )" }, { "id": 11418, "SQL": "select transaction_date from master_txn_table where customers = \"James Lane\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 11419, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Jacob Shepherd\"" }, { "id": 11420, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Photocopying services\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 11421, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Megan Peters\" ) " }, { "id": 11422, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Justin Pena\" order by transaction_date limit 1" }, { "id": 11423, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Becky Esparza\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) )" }, { "id": 11424, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 11425, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Maintenance and Repair\") and vendor = \"Benjamin Rodriguez\"" }, { "id": 11426, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 11427, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Providing support for money management\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 11428, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Megan Nixon\" ) " }, { "id": 11429, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Pool maintenance\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 11430, "SQL": "select transaction_date 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 = \"Coffee and Snack\" order by transaction_date asc limit 1 " }, { "id": 11431, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Hayley Walton\" ) " }, { "id": 11432, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Constructing duplexes\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 11433, "SQL": "select transaction_date from master_txn_table where customers = \"Kevin Edwards\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 11434, "SQL": "select sum(credit) from master_txn_table where product_service = \"Tablets\" and 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') " }, { "id": 11435, "SQL": "select transaction_date from master_txn_table where customers = \"Kelly Perry\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 11436, "SQL": "select transaction_date 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 = \"Catering\" order by transaction_date asc limit 1 " }, { "id": 11437, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Suzanne Hughes\" ) " }, { "id": 11438, "SQL": "select sum(credit) from master_txn_table where product_service = \"Aircraft Engines\" and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 11439, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by billing_city" }, { "id": 11440, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jason Malone\" order by transaction_date limit 1" }, { "id": 11441, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') group by billing_city" }, { "id": 11442, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 11443, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 11444, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Tricia Parker\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 11445, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 11446, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 11447, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Building Repairs\") and vendor = \"William Rice\"" }, { "id": 11448, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Christopher Decker\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 11449, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Erin Davis\" order by transaction_date limit 1" }, { "id": 11450, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Erin Zavala\" order by transaction_date limit 1" }, { "id": 11451, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Katherine Woods\" and transaction_type = 'payment' and 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') ) " }, { "id": 11452, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"James Lang\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 11453, "SQL": "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 navigational instruments (except electronic)\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 11454, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sergio Donovan\" ) " }, { "id": 11455, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 11456, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') 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') order by sum(debit) desc limit 1" }, { "id": 11457, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 11458, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Data entry services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 11459, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Dalton Todd\" order by transaction_date limit 1" }, { "id": 11460, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Design income\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 11461, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Joanne Lewis\" and transaction_type = 'payment' and 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') )" }, { "id": 11462, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jessica Tucker\" ) " }, { "id": 11463, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kevin Miles\" ) " }, { "id": 11464, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Daniel Le\" ) " }, { "id": 11465, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Barry Cohen\" ) " }, { "id": 11466, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 11467, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 11468, "SQL": "select transaction_id from master_txn_table where customers = \"Cheryl Bush\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 11469, "SQL": "select transaction_id from master_txn_table where customers = \"Lori Wagner\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 11470, "SQL": "select transaction_id from master_txn_table where product_service = \"Child guidance\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 11471, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Melissa Day\"" }, { "id": 11472, "SQL": "select transaction_date from master_txn_table where customers = \"Adam Hernandez\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 11473, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Kathy Bowers\"" }, { "id": 11474, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"John Freeman\" and transaction_type = 'payment' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') )" }, { "id": 11475, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') group by billing_city" }, { "id": 11476, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Biogenic municipal waste-fueled power generation\") and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 11477, "SQL": "select max(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 = \"Joseph Palmer\" and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 11478, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 11479, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Nathaniel Riley\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 11480, "SQL": "select transaction_date from master_txn_table where customers = \"Jeffery Ortega\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 11481, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Angela Norris\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) ) " }, { "id": 11482, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Jared Martin' or vendor = 'Jared Martin'" }, { "id": 11483, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Anthony Hill\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) ) " }, { "id": 11484, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Pedro Taylor\" ) " }, { "id": 11485, "SQL": "select transaction_date from master_txn_table where customers = \"Lynn Evans\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 11486, "SQL": "select transaction_date from master_txn_table where customers = \"Diana Hampton\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 11487, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 11488, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 11489, "SQL": "select transaction_id from master_txn_table where product_service = \"Teen outreach\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 11490, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 11491, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Lori Collins\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) )" }, { "id": 11492, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 11493, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') order by sum(debit) desc limit 1" }, { "id": 11494, "SQL": "select transaction_date 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 = \"Home office\" order by transaction_date asc limit 1 " }, { "id": 11495, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Constructing duplexes\") and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 11496, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Ventilation cleaning\") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 11497, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Taylor Jackson\" and account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 11498, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Michael Cowan\"" }, { "id": 11499, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jeremy Knox\" ) " }, { "id": 11500, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Private parcel mailing centers\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 11501, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"John Petersen\" and transaction_type = 'invoice'" }, { "id": 11502, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 11503, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 11504, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Daniel Grant\" ) " }, { "id": 11505, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 11506, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 11507, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Donald Brown\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 11508, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 11509, "SQL": "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 boats (except pleasure)\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 11510, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 11511, "SQL": "select max(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 = \"Daniel Colon\" and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 11512, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Jamie Fernandez\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) ) " }, { "id": 11513, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Zachary Huang\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 11514, "SQL": "select transaction_date 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 = \"Installation\" order by transaction_date asc limit 1 " }, { "id": 11515, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 11516, "SQL": "select sum(credit) from master_txn_table where product_service = \"Photocopying\" and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 11517, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 11518, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') order by sum(debit) desc limit 1" }, { "id": 11519, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Intravenous therapy\") and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 11520, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") order by sum(debit) desc limit 1" }, { "id": 11521, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') and account_type in ('Expense','Other Expense') " }, { "id": 11522, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lorraine Anderson\" ) " }, { "id": 11523, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jamie Wilson\" order by transaction_date limit 1" }, { "id": 11524, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Rail transportation support and other products\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 11525, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Kevin Ellison\"" }, { "id": 11526, "SQL": "select sum(credit) from master_txn_table where product_service = \"Memberships\" and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 11527, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Victor Martin\" ) " }, { "id": 11528, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 11529, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Taylor Johnson\" ) " }, { "id": 11530, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Rodney Austin\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 11531, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Tiffany Mitchell\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") ) " }, { "id": 11532, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 11533, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Lindsay Barnett\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 11534, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Rail transportation support and other products\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 11535, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Home-care Service\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 11536, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 11537, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Baby toys\") and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 11538, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Labor\") and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 11539, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Cesar Medina\" ) " }, { "id": 11540, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Tyrone Mcguire\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") ) " }, { "id": 11541, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 11542, "SQL": "select sum(credit) from master_txn_table where product_service = \"Wind power\" and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 11543, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 11544, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Eric Gonzalez\" ) " }, { "id": 11545, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 11546, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Nicholas Fletcher\" ) " }, { "id": 11547, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 11548, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Ronnie Thomas\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 11549, "SQL": "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,\"Telephone\") and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 11550, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Christine Lucas\" ) " }, { "id": 11551, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Erik Carter\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 11552, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 11553, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"John Mcclain\" ) " }, { "id": 11554, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Donna Perkins\" ) " }, { "id": 11555, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Timothy Miles\" ) " }, { "id": 11556, "SQL": "select transaction_id from master_txn_table where product_service = \"Chairs\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 11557, "SQL": "select transaction_id from master_txn_table where product_service = \"Drain cleaning\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 11558, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Connor Watson\"" }, { "id": 11559, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Robert Reese\" ) " }, { "id": 11560, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 11561, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"License fees\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 11562, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 11563, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Saddlery retailing\") and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 11564, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Eugene Riggs\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 11565, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Robert Braun\" ) " }, { "id": 11566, "SQL": "select min(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 = \"Allen Collins\" and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 11567, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") order by sum(debit) desc limit 1" }, { "id": 11568, "SQL": "select sum(credit) from master_txn_table where product_service = \"Golf Courses\" and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 11569, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Hailey Jones\" ) " }, { "id": 11570, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Towboat and tugboat rental or leasing\") 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') " }, { "id": 11571, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 11572, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Data processing computer services\") and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 11573, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 11574, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Jordan Scott\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') ) " }, { "id": 11575, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date) AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 11576, "SQL": "select transaction_date 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 = \"Motorbike\" order by transaction_date asc limit 1 " }, { "id": 11577, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Edward Ramsey\" ) " }, { "id": 11578, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 11579, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Sherri Mendoza\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date) AND date(current_date) )" }, { "id": 11580, "SQL": "select transaction_date from master_txn_table where customers = \"Faith Ellison\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 11581, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Kimberly Ramos\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 11582, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Meghan Lewis\" ) " }, { "id": 11583, "SQL": "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,\"Offering macro funds\") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 11584, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Christopher Austin\" ) " }, { "id": 11585, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Tina Peterson\" ) " }, { "id": 11586, "SQL": "select sum(credit) from master_txn_table where product_service = \"Counseling\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 11587, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Dana Austin\" ) " }, { "id": 11588, "SQL": "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,\"Drain cleaning\") 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') " }, { "id": 11589, "SQL": "select distinct transaction_id from master_txn_table where customers = \"David Harris\"" }, { "id": 11590, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 11591, "SQL": "select max(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 = \"Christopher Gibbs\" and 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') " }, { "id": 11592, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 11593, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Thomas Walker\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 11594, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Beth Morgan\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 11595, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ronald Bradley\" ) " }, { "id": 11596, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Joseph Robles\" and transaction_type = 'invoice'" }, { "id": 11597, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 11598, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 11599, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by billing_city" }, { "id": 11600, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Barge rental or leasing\") and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 11601, "SQL": "select max(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 = \"Michelle Haas\" and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 11602, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 11603, "SQL": "select transaction_date 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 = \"Macs\" order by transaction_date asc limit 1 " }, { "id": 11604, "SQL": "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 support services for financial\") and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 11605, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Vanessa Young\"" }, { "id": 11606, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jeffrey Lowery\" ) " }, { "id": 11607, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Shannon Hernandez\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') ) " }, { "id": 11608, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Brittany Mayer' or vendor = 'Brittany Mayer'" }, { "id": 11609, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 11610, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Mike Lawson\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) ) " }, { "id": 11611, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 11612, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 11613, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Troy Woodard\" ) " }, { "id": 11614, "SQL": "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 engines and parts\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 11615, "SQL": "select max(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 = \"Kelly Walker\" and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 11616, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Blake Lara\" ) " }, { "id": 11617, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Raymond Davis\" ) " }, { "id": 11618, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Hydroelectric power generation\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 11619, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brandy Watson\" ) " }, { "id": 11620, "SQL": "select transaction_date from master_txn_table where customers = \"David Harper\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 11621, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Adam Montgomery\" ) " }, { "id": 11622, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and 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') group by billing_city" }, { "id": 11623, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 11624, "SQL": "select transaction_id from master_txn_table where customers = \"Leslie Hill\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 11625, "SQL": "select sum(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Packaging and labeling\" " }, { "id": 11626, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') group by product_service order by sum(credit) desc limit 1" }, { "id": 11627, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Darren Schmidt\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') )" }, { "id": 11628, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') group by billing_city" }, { "id": 11629, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 11630, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 11631, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"William Larson\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) ) " }, { "id": 11632, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') group by billing_city" }, { "id": 11633, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Spraying services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 11634, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"John Estes\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 11635, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Laura Paul\" order by transaction_date limit 1" }, { "id": 11636, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Tracy Wise\"" }, { "id": 11637, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 11638, "SQL": "select min(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 = \"Jessica Holder\" and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 11639, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 11640, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 11641, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Chase Jenkins\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 11642, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Alexander Simmons\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 11643, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Amy Downs\" ) " }, { "id": 11644, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Tonya Higgins\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) ) " }, { "id": 11645, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Wanda Rojas\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 11646, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Susan Kim\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') )" }, { "id": 11647, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Richard Woods' or vendor = 'Richard Woods'" }, { "id": 11648, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Popular music shows\") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 11649, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Hannah Fuller\" order by transaction_date limit 1" }, { "id": 11650, "SQL": "select transaction_id from master_txn_table where customers = \"David Nelson\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 11651, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Gerald Watts' or vendor = 'Gerald Watts'" }, { "id": 11652, "SQL": "select transaction_date 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 = \"Voice & Speech Recognition\" order by transaction_date asc limit 1 " }, { "id": 11653, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Maintenance and Repairs\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 11654, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 11655, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 11656, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Providing other outdoor maintenance services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 11657, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Sherry Hardy\" order by transaction_date limit 1" }, { "id": 11658, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 11659, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') group by billing_city" }, { "id": 11660, "SQL": "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,\"Medical services\") and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 11661, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 11662, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Dawn Smith\" and transaction_type = 'payment' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') ) " }, { "id": 11663, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Commissions & fees\") and vendor = \"Rhonda Young\"" }, { "id": 11664, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 11665, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Jason Perez\"" }, { "id": 11666, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Helium\" " }, { "id": 11667, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Brian Campbell\" order by transaction_date limit 1" }, { "id": 11668, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Oxygen manufacturing\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 11669, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Retailing Wardrobe\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 11670, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Bradley Mcdaniel\" ) " }, { "id": 11671, "SQL": "select transaction_id from master_txn_table where product_service = \"Youth\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 11672, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 11673, "SQL": "select sum(credit) from master_txn_table where product_service = \"Service Provider\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 11674, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Krista Chambers\"" }, { "id": 11675, "SQL": "select avg(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 = \"Donna Garner\" and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 11676, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 11677, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Carol Miranda\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 11678, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 11679, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 11680, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Megan Hanson\"" }, { "id": 11681, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Ronald Anderson\" order by transaction_date limit 1" }, { "id": 11682, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Tina Smith\" and transaction_type = 'invoice'" }, { "id": 11683, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Julie Ward\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 11684, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 11685, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 11686, "SQL": "select transaction_date from master_txn_table where customers = \"William Ward\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 11687, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by billing_city" }, { "id": 11688, "SQL": "select avg(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 = \"Sarah Potter\" and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 11689, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Aircraft Engines\" " }, { "id": 11690, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"James Berry\" ) " }, { "id": 11691, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Unapplied Cash Bill Payment Expense\") and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 11692, "SQL": "select transaction_id from master_txn_table where product_service = \"Non-nuclear\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 11693, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 11694, "SQL": "select transaction_date from master_txn_table where customers = \"Darren Taylor\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 11695, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 11696, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Travel\") and vendor = \"Russell Burton\"" }, { "id": 11697, "SQL": "select transaction_id from master_txn_table where customers = \"Stephanie Jones\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 11698, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Tara Johnston\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 11699, "SQL": "select transaction_id from master_txn_table where product_service = \"Memberships\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 11700, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 11701, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 11702, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Lisa Ross\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) ) " }, { "id": 11703, "SQL": "select transaction_date 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\" order by transaction_date asc limit 1 " }, { "id": 11704, "SQL": "select sum(credit) from master_txn_table where product_service = \"Dance\" and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 11705, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by billing_city" }, { "id": 11706, "SQL": "select max(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 = \"Alexander Bailey\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 11707, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 11708, "SQL": "select transaction_date from master_txn_table where customers = \"Louis Watson\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 11709, "SQL": "select transaction_date 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 = \"Heavy construction equipment\" order by transaction_date asc limit 1 " }, { "id": 11710, "SQL": "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,\"Offering equity long/short \") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 11711, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Photography\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 11712, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 11713, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 11714, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 11715, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Debra Gardner\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 11716, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') group by billing_city" }, { "id": 11717, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 11718, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Amber Gonzalez\" ) " }, { "id": 11719, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' 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') " }, { "id": 11720, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 11721, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Jacqueline Mccoy\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) )" }, { "id": 11722, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"golf courses and country clubs\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 11723, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Michael Avery\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 11724, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 11725, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Christian Mathis\" ) " }, { "id": 11726, "SQL": "select transaction_date from master_txn_table where customers = \"Douglas Thompson\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 11727, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Livestock health services\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 11728, "SQL": "select transaction_id from master_txn_table where customers = \"Robert Moore\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 11729, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Teen outreach services\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 11730, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by billing_city" }, { "id": 11731, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Ronald David\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 11732, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"William Alvarado\" ) " }, { "id": 11733, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Amanda Young\" ) " }, { "id": 11734, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Mary Reyes\" order by transaction_date limit 1" }, { "id": 11735, "SQL": "select product_service, 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 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') group by product_service order by sum(credit) desc limit 1" }, { "id": 11736, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Beth Parrish\" ) " }, { "id": 11737, "SQL": "select transaction_id from master_txn_table where customers = \"Ralph Smith\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 11738, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 11739, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Suzanne Massey\" order by transaction_date limit 1" }, { "id": 11740, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Photocopying services\") and 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') " }, { "id": 11741, "SQL": "select product_service, 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 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') group by product_service order by sum(credit) desc limit 1" }, { "id": 11742, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 11743, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Photocopying services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 11744, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by billing_city" }, { "id": 11745, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Senior-care\" " }, { "id": 11746, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Debra Pugh\" and transaction_type = 'invoice'" }, { "id": 11747, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Cassandra Douglas\"" }, { "id": 11748, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 11749, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 11750, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Edward Ruiz\" order by transaction_date limit 1" }, { "id": 11751, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 11752, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 11753, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 11754, "SQL": "select transaction_id from master_txn_table where product_service = \"Carriers\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 11755, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 11756, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Douglas Medina\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') ) " }, { "id": 11757, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Christine Davis\" order by transaction_date limit 1" }, { "id": 11758, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Regina Russell\"" }, { "id": 11759, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 11760, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 11761, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Dustin Wilson\" ) " }, { "id": 11762, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Nathaniel Barr\" ) " }, { "id": 11763, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Constructing townhouses\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 11764, "SQL": "select transaction_id from master_txn_table where product_service = \"Opera\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 11765, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 11766, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Raymond Cunningham\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) )" }, { "id": 11767, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Pamela Stewart\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 11768, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Karen Harmon\" order by transaction_date limit 1" }, { "id": 11769, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Paula Lane' or vendor = 'Paula Lane'" }, { "id": 11770, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Wendy Sheppard\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) ) " }, { "id": 11771, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Hunter Soto\"" }, { "id": 11772, "SQL": "select transaction_date from master_txn_table where customers = \"Roy Jones\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 11773, "SQL": "select product_service, 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 transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') group by product_service order by sum(credit) desc limit 1" }, { "id": 11774, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Tony Jones IV\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) ) " }, { "id": 11775, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Barge rental or leasing\") and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 11776, "SQL": "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,\"Hotels and motel services\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 11777, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 11778, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Charles White\"" }, { "id": 11779, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Daily living assistance\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 11780, "SQL": "select transaction_date from master_txn_table where customers = \"Carlos Romero\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 11781, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 11782, "SQL": "select avg(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 = \"Mary Lee\" and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 11783, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Nicholas Bond\" ) " }, { "id": 11784, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 11785, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 11786, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Baby car seats\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 11787, "SQL": "select transaction_date 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 = \"Adoption\" order by transaction_date asc limit 1 " }, { "id": 11788, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Non-musical performances\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 11789, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Mary Henderson\" order by transaction_date limit 1" }, { "id": 11790, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Gary Moore\" order by transaction_date limit 1" }, { "id": 11791, "SQL": "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 support services for financial\") 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') " }, { "id": 11792, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 11793, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Todd Harrell\" order by transaction_date limit 1" }, { "id": 11794, "SQL": "select min(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 = \"Michael Crane\" and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 11795, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Eric Crane\" ) " }, { "id": 11796, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 11797, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Ashley Lutz\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 11798, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Joshua Howard\" and account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 11799, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Carly Conway\" ) " }, { "id": 11800, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Tyler Oneill\" order by transaction_date limit 1" }, { "id": 11801, "SQL": "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,\"Computer Repairs\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 11802, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Christine Ballard\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date) AND date(current_date) )" }, { "id": 11803, "SQL": "select transaction_date 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 = \"Emerging Market\" order by transaction_date asc limit 1 " }, { "id": 11804, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Other Services\") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 11805, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Pamela Singh\" ) " }, { "id": 11806, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Susan Taylor\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 11807, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 11808, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kayla Burton\" ) " }, { "id": 11809, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"John Little MD\" ) " }, { "id": 11810, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Nichole Miller\"" }, { "id": 11811, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Ann Alvarez\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') )" }, { "id": 11812, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Tonya Smith\" and transaction_type = 'payment' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') )" }, { "id": 11813, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Cody Hughes\" and transaction_type = 'payment' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') )" }, { "id": 11814, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Leah Taylor\"" }, { "id": 11815, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Tyrone Bradshaw\" and transaction_type = 'payment' and 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') )" }, { "id": 11816, "SQL": "select transaction_id from master_txn_table where product_service = \"Other essential oils\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 11817, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Scott Perry\"" }, { "id": 11818, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Erin Sanders\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 11819, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Margaret Burch\"" }, { "id": 11820, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 11821, "SQL": "select transaction_date from master_txn_table where customers = \"Cody Nguyen\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 11822, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Taylor Nelson\" and account_type in ('Expense','Other Expense') and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 11823, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sharon Guzman\" ) " }, { "id": 11824, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Johnny Nichols\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') )" }, { "id": 11825, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Megan Key\" ) " }, { "id": 11826, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 11827, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Stacy Hood\" ) " }, { "id": 11828, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Traci Coffey\" ) " }, { "id": 11829, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 11830, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Timothy Galloway\" ) " }, { "id": 11831, "SQL": "select sum(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Steno class\" " }, { "id": 11832, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 11833, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kevin Harvey\" ) " }, { "id": 11834, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Advertising\") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 11835, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 11836, "SQL": "select max(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 = \"Lauren Rodriguez DVM\" and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 11837, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') 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') order by sum(debit) desc limit 1" }, { "id": 11838, "SQL": "select transaction_date from master_txn_table where customers = \"Frederick Cox\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 11839, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 11840, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 11841, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 11842, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Brianna Keller\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) )" }, { "id": 11843, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Organic Gases\" " }, { "id": 11844, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kayla Kaiser\" ) " }, { "id": 11845, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Amber Rogers\" ) " }, { "id": 11846, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 11847, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 11848, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"William Cook\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 11849, "SQL": "select transaction_id from master_txn_table where product_service = \"Gifts and grants\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 11850, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"George Smith\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 11851, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Sylvia Frost\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 11852, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jacob Holloway\" order by transaction_date limit 1" }, { "id": 11853, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kristin Christian\" ) " }, { "id": 11854, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 11855, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Jacqueline Gomez\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 11856, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Ian Rivera\"" }, { "id": 11857, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Gary Ward\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) ) " }, { "id": 11858, "SQL": "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,\"Retailing formal dining furniture\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 11859, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 11860, "SQL": "select transaction_date from master_txn_table where customers = \"Gabriel Aguilar\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 11861, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) group by billing_city" }, { "id": 11862, "SQL": "select transaction_id from master_txn_table where customers = \"Linda Kennedy\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 11863, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Derrick Logan\" and account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 11864, "SQL": "select sum(credit) from master_txn_table where product_service = \"Carbon dioxide\" and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 11865, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Tony Hanson\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 11866, "SQL": "select transaction_id from master_txn_table where product_service = \"Rail support\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 11867, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and 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') order by sum(debit) desc limit 1" }, { "id": 11868, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Craig Le\" ) " }, { "id": 11869, "SQL": "select sum(credit) from master_txn_table where product_service = \"Contracts\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 11870, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Danny Mendoza\" ) " }, { "id": 11871, "SQL": "select transaction_id from master_txn_table where product_service = \"Car seats\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 11872, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 11873, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Melissa Ruiz\"" }, { "id": 11874, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Dustin Benson\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date) AND date(current_date) ) " }, { "id": 11875, "SQL": "select transaction_date from master_txn_table where customers = \"Kristen Barnes\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 11876, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Roger Zavala\" ) " }, { "id": 11877, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 11878, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Saddlery retailing\") and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 11879, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date) AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 11880, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 11881, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 11882, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Elizabeth Cobb\" ) " }, { "id": 11883, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Katelyn Murray\"" }, { "id": 11884, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 11885, "SQL": "select product_service, 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 transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') group by product_service order by sum(credit) desc limit 1" }, { "id": 11886, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Eric Vazquez\"" }, { "id": 11887, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Anthony Reid\" and transaction_type = 'invoice'" }, { "id": 11888, "SQL": "select transaction_date 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 = \"Shipping\" order by transaction_date asc limit 1 " }, { "id": 11889, "SQL": "select transaction_date 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 = \"PCs\" order by transaction_date asc limit 1 " }, { "id": 11890, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Offering multi-strategy funds\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 11891, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 11892, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 11893, "SQL": "select transaction_date 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 = \"homebuilders\" order by transaction_date asc limit 1 " }, { "id": 11894, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Ethical Hacking Training\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 11895, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kenneth Reed\" ) " }, { "id": 11896, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 11897, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 11898, "SQL": "select transaction_date 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 = \"Gifts and grants\" order by transaction_date asc limit 1 " }, { "id": 11899, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Repairing locomotives and railcars (except factory conversion, overhaul and rebuilding)\") and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 11900, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Roberta Wade\" ) " }, { "id": 11901, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"David Blair\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 11902, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Anne Jones\"" }, { "id": 11903, "SQL": "select transaction_id from master_txn_table where customers = \"Alyssa Hernandez\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 11904, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 11905, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Tara Quinn\"" }, { "id": 11906, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Allison Lyons\" ) " }, { "id": 11907, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Erica Carson\" order by transaction_date limit 1" }, { "id": 11908, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 11909, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 11910, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Jennifer Smith\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 11911, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Lisa Moses\"" }, { "id": 11912, "SQL": "select transaction_id from master_txn_table where customers = \"Dawn Knapp\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 11913, "SQL": "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 personal care\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 11914, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Daisy Delacruz\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 11915, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by billing_city" }, { "id": 11916, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Misty Bradley\" and transaction_type = 'invoice'" }, { "id": 11917, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 11918, "SQL": "select transaction_date from master_txn_table where customers = \"Julie Irwin\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 11919, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Andrea Sheppard\"" }, { "id": 11920, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Edward Castillo\" ) " }, { "id": 11921, "SQL": "select transaction_id from master_txn_table where customers = \"Lisa Hudson\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 11922, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Elizabeth Gamble\" ) " }, { "id": 11923, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date) AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 11924, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jonathan Orozco\" ) " }, { "id": 11925, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Jeffrey Price\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 11926, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Kristopher Gonzales' or vendor = 'Kristopher Gonzales'" }, { "id": 11927, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Richard Malone\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') )" }, { "id": 11928, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Steven Stone\" ) " }, { "id": 11929, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 11930, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Kari Stephens DVM' or vendor = 'Kari Stephens DVM'" }, { "id": 11931, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Vanessa Lee\" ) " }, { "id": 11932, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Susan Farley\"" }, { "id": 11933, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 11934, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 11935, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Hydrogen\" " }, { "id": 11936, "SQL": "select transaction_date from master_txn_table where customers = \"Marilyn Roth\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 11937, "SQL": "select transaction_date from master_txn_table where customers = \"William Foley\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 11938, "SQL": "select transaction_date 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 = \"Financial Planning\" order by transaction_date asc limit 1 " }, { "id": 11939, "SQL": "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,\"Coffee and snack shops\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 11940, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Shannon Gonzalez\" ) " }, { "id": 11941, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Andrea Roberts\" order by transaction_date limit 1" }, { "id": 11942, "SQL": "select product_service, 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 transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') group by product_service order by sum(credit) desc limit 1" }, { "id": 11943, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') and account_type in ('Expense','Other Expense') " }, { "id": 11944, "SQL": "select transaction_id from master_txn_table where customers = \"Kaitlin Mcconnell\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 11945, "SQL": "select transaction_date 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 = \"Printing\" order by transaction_date asc limit 1 " }, { "id": 11946, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 11947, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by billing_city" }, { "id": 11948, "SQL": "select transaction_date from master_txn_table where customers = \"Dawn Herrera\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 11949, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Jennifer Rush\"" }, { "id": 11950, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Baby carriers\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 11951, "SQL": "select transaction_id from master_txn_table where product_service = \"Synthetic Oils\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 11952, "SQL": "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,\"Fees Billed\") and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 11953, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 11954, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 11955, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Christian Jackson\" ) " }, { "id": 11956, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 11957, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Thomas Wright\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) )" }, { "id": 11958, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Casey Smith\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) ) " }, { "id": 11959, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 11960, "SQL": "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,\"Quality management assessment\") and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 11961, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") group by billing_city" }, { "id": 11962, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 11963, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Parking lot and driveway washing\" " }, { "id": 11964, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Heather Hall\" ) " }, { "id": 11965, "SQL": "select transaction_date 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 = \"Camping and Parking\" order by transaction_date asc limit 1 " }, { "id": 11966, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 11967, "SQL": "select transaction_id from master_txn_table where customers = \"Louis Grant\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 11968, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Jonathan Juarez PhD' or vendor = 'Jonathan Juarez PhD'" }, { "id": 11969, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Erik Adams\"" }, { "id": 11970, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ralph Moore\" ) " }, { "id": 11971, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 11972, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Grant Cox\"" }, { "id": 11973, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Sarah Delacruz\" order by transaction_date limit 1" }, { "id": 11974, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Brandy Watson\"" }, { "id": 11975, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Medication dispensing\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 11976, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') and account_type in ('Expense','Other Expense') " }, { "id": 11977, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)group by product_service order by sum(credit) desc limit 1" }, { "id": 11978, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Henry Camacho\" ) " }, { "id": 11979, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Carl Jenkins\"" }, { "id": 11980, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Application service provisioning\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 11981, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Shelley Watts\" ) " }, { "id": 11982, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 11983, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lori Munoz\" ) " }, { "id": 11984, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) group by billing_city" }, { "id": 11985, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 11986, "SQL": "select transaction_date 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 = \"Surveying wells\" order by transaction_date asc limit 1 " }, { "id": 11987, "SQL": "select product_service, 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 transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') group by product_service order by sum(credit) desc limit 1" }, { "id": 11988, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Desiree Miller\" ) " }, { "id": 11989, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 11990, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Shelly Osborne\" order by transaction_date limit 1" }, { "id": 11991, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Dawn Robinson\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 11992, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)group by product_service order by sum(credit) desc limit 1" }, { "id": 11993, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 11994, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 11995, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') order by sum(debit) desc limit 1" }, { "id": 11996, "SQL": "select transaction_date from master_txn_table where customers = \"Stacy Watts\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 11997, "SQL": "select transaction_date 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 = \"Waste-fueled\" order by transaction_date asc limit 1 " }, { "id": 11998, "SQL": "select transaction_date from master_txn_table where customers = \"Brandy Santiago\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 11999, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Stephanie Garcia\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 12000, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Austin Davis\" ) " }, { "id": 12001, "SQL": "select transaction_date 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 = \"Diving\" order by transaction_date asc limit 1 " }, { "id": 12002, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Providing courses in computer programming\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 12003, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Eric Dixon' or vendor = 'Eric Dixon'" }, { "id": 12004, "SQL": "select sum(credit) from master_txn_table where product_service = \"Commodity Markets\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 12005, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Business services centers\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 12006, "SQL": "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 = \"Samuel Graham\" and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 12007, "SQL": "select transaction_date from master_txn_table where customers = \"Frank Brooks\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 12008, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 12009, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 12010, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Equipment Repairs\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 12011, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Rachel Coleman\" ) " }, { "id": 12012, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 12013, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Vincent Howard\" ) " }, { "id": 12014, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Leslie Sweeney\" and transaction_type = 'payment' 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') )" }, { "id": 12015, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Nicole Wilson\" order by transaction_date limit 1" }, { "id": 12016, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Joshua Fisher\"" }, { "id": 12017, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Nathaniel Medina\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 12018, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"William Huang\" ) " }, { "id": 12019, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Adrienne Barnes\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 12020, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Billy Harrison\"" }, { "id": 12021, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Refunds-Allowances\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 12022, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Joshua Mcpherson\" ) " }, { "id": 12023, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Tony Wade\" ) " }, { "id": 12024, "SQL": "select sum(credit) from master_txn_table where product_service = \"Therapy\" and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 12025, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Timothy Powell\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 12026, "SQL": "select transaction_date from master_txn_table where customers = \"Charles Simon\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 12027, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Nathan Arias\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) ) " }, { "id": 12028, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Motorbike \") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 12029, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Computer Repairs\") and vendor = \"Linda Reeves\"" }, { "id": 12030, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Brittany Larson\"" }, { "id": 12031, "SQL": "select transaction_id from master_txn_table where product_service = \"Swimming pool Cleaning\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 12032, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Melissa Walker\" ) " }, { "id": 12033, "SQL": "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\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 12034, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Stephanie Ferguson' or vendor = 'Stephanie Ferguson'" }, { "id": 12035, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Private parcel mailing services\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 12036, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 12037, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 12038, "SQL": "select transaction_date from master_txn_table where customers = \"Nicole Craig\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 12039, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and 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') " }, { "id": 12040, "SQL": "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,\"Unapplied Cash Payment Income\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 12041, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 12042, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Rebekah Neal\"" }, { "id": 12043, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Devin Burch\" ) " }, { "id": 12044, "SQL": "select avg(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 = \"David Mercado\" and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 12045, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Casey Parker\" and account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 12046, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Heidi Robinson\" ) " }, { "id": 12047, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Manufacturing spearmint oil\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 12048, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 12049, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 12050, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Macro\" " }, { "id": 12051, "SQL": "select transaction_date from master_txn_table where customers = \"Karen Bowman MD\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 12052, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Cementing wells\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 12053, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Michelle Reid\" ) " }, { "id": 12054, "SQL": "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,\"Retailing Chairs\") and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 12055, "SQL": "select transaction_date 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 = \"Data processing\" order by transaction_date asc limit 1 " }, { "id": 12056, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 12057, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Susan Ross\" ) " }, { "id": 12058, "SQL": "select product_service, 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 transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') group by product_service order by sum(credit) desc limit 1" }, { "id": 12059, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kenneth West\" ) " }, { "id": 12060, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 12061, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"William Anderson\"" }, { "id": 12062, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 12063, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 12064, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Eric Dominguez\" ) " }, { "id": 12065, "SQL": "select transaction_id from master_txn_table where product_service = \"Non-renewable\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 12066, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Child abuse prevention\" " }, { "id": 12067, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 12068, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Retailing formal dining furniture\") and 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') " }, { "id": 12069, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Kevin Gomez\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) ) " }, { "id": 12070, "SQL": "select transaction_id from master_txn_table where customers = \"Brian Bauer\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 12071, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 12072, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 12073, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'John Watson' or vendor = 'John Watson'" }, { "id": 12074, "SQL": "select transaction_id from master_txn_table where product_service = \"Meals\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 12075, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 12076, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Nancy Howard\" order by transaction_date limit 1" }, { "id": 12077, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Jason Ewing\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 12078, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sean Newton\" ) " }, { "id": 12079, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"James Patton\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 12080, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Loan Payable\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 12081, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Timothy Reed\" order by transaction_date limit 1" }, { "id": 12082, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 12083, "SQL": "select transaction_date from master_txn_table where customers = \"Darryl Haley\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 12084, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Contract mining\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 12085, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Megan Thomas\" ) " }, { "id": 12086, "SQL": "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,\"Child guidance services\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 12087, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') group by billing_city" }, { "id": 12088, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Brandon Davis\" order by transaction_date limit 1" }, { "id": 12089, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Data processing computer services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 12090, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 12091, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Job Materials\") and vendor = \"David Vance\"" }, { "id": 12092, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Joel Warner\" ) " }, { "id": 12093, "SQL": "select sum(credit) from master_txn_table where product_service = \"Drain cleaning\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 12094, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Julie Flynn MD\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 12095, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 12096, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') order by sum(debit) desc limit 1" }, { "id": 12097, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 12098, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 12099, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 12100, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Providing dealing services\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 12101, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 12102, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Phillip Rivera\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) )" }, { "id": 12103, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Samuel Bishop\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 12104, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Rent or Lease\") and vendor = \"Ashley Webb\"" }, { "id": 12105, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 12106, "SQL": "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,\"Offering equity market neutral funds\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 12107, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') 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') group by billing_city" }, { "id": 12108, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Edward Mcpherson\"" }, { "id": 12109, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Sherry Mayo' or vendor = 'Sherry Mayo'" }, { "id": 12110, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Joseph Durham\" ) " }, { "id": 12111, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Chelsea Velasquez\" order by transaction_date limit 1" }, { "id": 12112, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 12113, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Maria Griffin\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) ) " }, { "id": 12114, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 12115, "SQL": "select transaction_id from master_txn_table where customers = \"Douglas Mendoza\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 12116, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Packing services for goods\") and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 12117, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Henry Galvan\"" }, { "id": 12118, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Nichole Carroll\" and transaction_type = 'invoice'" }, { "id": 12119, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Party favors\") and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 12120, "SQL": "select transaction_id from master_txn_table where product_service = \"Postal\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 12121, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Stephen Warner\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") )" }, { "id": 12122, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 12123, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Andrea Peterson\" order by transaction_date limit 1" }, { "id": 12124, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Scott Garza\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 12125, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Anna Castillo\" order by transaction_date limit 1" }, { "id": 12126, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Christian Shannon\" ) " }, { "id": 12127, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 12128, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Cleaning\" " }, { "id": 12129, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Travis Bender\" ) " }, { "id": 12130, "SQL": "select transaction_date 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 = \"Diapers\" order by transaction_date asc limit 1 " }, { "id": 12131, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Andrea Murillo\" ) " }, { "id": 12132, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jessica Smith\"" }, { "id": 12133, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 12134, "SQL": "select transaction_id from master_txn_table where product_service = \"Chairs\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 12135, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Audrey Torres\" ) " }, { "id": 12136, "SQL": "select sum(credit) from master_txn_table where product_service = \"Youth community\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 12137, "SQL": "select min(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 = \"Francis Mcdowell\" and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 12138, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sharon Mcdowell\" ) " }, { "id": 12139, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Joshua Rich' or vendor = 'Joshua Rich'" }, { "id": 12140, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Selena Osborne\" order by transaction_date limit 1" }, { "id": 12141, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) group by billing_city" }, { "id": 12142, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Timothy Herrera\" ) " }, { "id": 12143, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Youth community\" " }, { "id": 12144, "SQL": "select transaction_date from master_txn_table where customers = \"Kevin Gordon\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 12145, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Gary Sampson\" ) " }, { "id": 12146, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Abigail Mack\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 12147, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Angela Richard\" order by transaction_date limit 1" }, { "id": 12148, "SQL": "select transaction_date 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 = \"Bedroom\" order by transaction_date asc limit 1 " }, { "id": 12149, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 12150, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) group by billing_city" }, { "id": 12151, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Jasmine Maldonado\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') ) " }, { "id": 12152, "SQL": "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,\"Diapers\") and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 12153, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Steven Pierce\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') ) " }, { "id": 12154, "SQL": "select transaction_date from master_txn_table where customers = \"Mitchell Abbott\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 12155, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 12156, "SQL": "select transaction_date 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 = \"Child abuse prevention\" order by transaction_date asc limit 1 " }, { "id": 12157, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Megan Vega\" and account_type in ('Expense','Other Expense') and 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') " }, { "id": 12158, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jackie Newton\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 12159, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Robert Johnson\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 12160, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 12161, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Hydrogen\" " }, { "id": 12162, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Food & drink\" " }, { "id": 12163, "SQL": "select transaction_date from master_txn_table where customers = \"Michael Jefferson\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 12164, "SQL": "select min(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 = \"Robert Pace\" and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 12165, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 12166, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Tracy Mckinney\" order by transaction_date limit 1" }, { "id": 12167, "SQL": "select transaction_id from master_txn_table where product_service = \"Tablets\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 12168, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ian Bailey\" ) " }, { "id": 12169, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") group by product_service order by sum(credit) desc limit 1" }, { "id": 12170, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 12171, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Catherine Thomas\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 12172, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Catherine Pitts\" and account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 12173, "SQL": "select transaction_date from master_txn_table where customers = \"Rachel Roberson\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 12174, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ashley Romero\" ) " }, { "id": 12175, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 12176, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Angel Brewer' or vendor = 'Angel Brewer'" }, { "id": 12177, "SQL": "select transaction_id from master_txn_table where product_service = \"Grapefruit oil\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 12178, "SQL": "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 support services for commodity markets\") and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 12179, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Travel\") and vendor = \"Cheryl Rosario\"" }, { "id": 12180, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Leah Green\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) ) " }, { "id": 12181, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Decks and Patios\") and vendor = \"Emily Freeman\"" }, { "id": 12182, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Allison Smith\"" }, { "id": 12183, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Disposal Fees\") and vendor = \"Ashley Powell\"" }, { "id": 12184, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Christina Martin\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') )" }, { "id": 12185, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)group by product_service order by sum(credit) desc limit 1" }, { "id": 12186, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Roberto Mendoza\" ) " }, { "id": 12187, "SQL": "select transaction_date from master_txn_table where customers = \"Timothy Rhodes\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 12188, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Bridget Boyd\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 12189, "SQL": "select sum(credit) from master_txn_table where product_service = \"Drinking and Special Food\" and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 12190, "SQL": "select transaction_date 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 = \"Securities\" order by transaction_date asc limit 1 " }, { "id": 12191, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Daniel Pittman\" ) " }, { "id": 12192, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jeanne Riley\" ) " }, { "id": 12193, "SQL": "select transaction_date 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 = \"AI Courses\" order by transaction_date asc limit 1 " }, { "id": 12194, "SQL": "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,\"Savings\") and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 12195, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Bank Charges\") and vendor = \"Amanda Garza MD\"" }, { "id": 12196, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') 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') order by sum(debit) desc limit 1" }, { "id": 12197, "SQL": "select avg(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 = \"Thomas Rice\" and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 12198, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 12199, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Deborah Garrett DDS\" order by transaction_date limit 1" }, { "id": 12200, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 12201, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Medical services\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 12202, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 12203, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sara Garcia\" ) " }, { "id": 12204, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 12205, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Anthony Marks\" and transaction_type = 'payment' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') )" }, { "id": 12206, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 12207, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 12208, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Michael Turner\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 12209, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 12210, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brenda Summers\" ) " }, { "id": 12211, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Home-care Service\") and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 12212, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 12213, "SQL": "select transaction_id from master_txn_table where product_service = \"Contracts\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 12214, "SQL": "select transaction_id from master_txn_table where customers = \"Rita Pierce\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 12215, "SQL": "select transaction_date 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 = \"Aircraft Engines\" order by transaction_date asc limit 1 " }, { "id": 12216, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brittany Gomez\" ) " }, { "id": 12217, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Shawn Merritt\" ) " }, { "id": 12218, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Brittany Fox' or vendor = 'Brittany Fox'" }, { "id": 12219, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 12220, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 12221, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 12222, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 12223, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Lisa Pitts\" order by transaction_date limit 1" }, { "id": 12224, "SQL": "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,\"Counseling\") and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 12225, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Stacey Ferrell\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') )" }, { "id": 12226, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by billing_city" }, { "id": 12227, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and 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') group by billing_city" }, { "id": 12228, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 12229, "SQL": "select transaction_id from master_txn_table where product_service = \"Club \" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 12230, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Stationery & Printing\") and vendor = \"Shelly Howard\"" }, { "id": 12231, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 12232, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") group by product_service order by sum(credit) desc limit 1" }, { "id": 12233, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Sharon Morris\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 12234, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Duplexes\" " }, { "id": 12235, "SQL": "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,\"Bicycle retailing\") and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 12236, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Ventilation cleaning\") and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 12237, "SQL": "select max(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 = \"Andrea Jackson\" and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 12238, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Andrea Murphy\" ) " }, { "id": 12239, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Susan Mendoza\"" }, { "id": 12240, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 12241, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 12242, "SQL": "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 other outdoor maintenance services\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 12243, "SQL": "select transaction_id from master_txn_table where product_service = \"Citronella oil\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 12244, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Money Management\" " }, { "id": 12245, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Livestock health services\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 12246, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Charles Torres\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 12247, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Basic office and secretarial skills training\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 12248, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Uncategorized Expense\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 12249, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Robert Wise\" ) " }, { "id": 12250, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 12251, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Amanda Allen\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) )" }, { "id": 12252, "SQL": "select transaction_id from master_txn_table where product_service = \"Strollers\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 12253, "SQL": "select transaction_id from master_txn_table where product_service = \"Wardrobe\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 12254, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 12255, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 12256, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 12257, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 12258, "SQL": "select max(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 = \"Leslie Medina\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 12259, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 12260, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Paige Rodriguez\" order by transaction_date limit 1" }, { "id": 12261, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Amy Long\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 12262, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 12263, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date) AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 12264, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 12265, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Thomas Cox\" ) " }, { "id": 12266, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Thomas Madden\" ) " }, { "id": 12267, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Bradley Morrow\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") ) " }, { "id": 12268, "SQL": "select transaction_date from master_txn_table where customers = \"Gary Freeman\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 12269, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jamie Duke\" and transaction_type = 'invoice'" }, { "id": 12270, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Appearances and speeches\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 12271, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Dominique Ellis' or vendor = 'Dominique Ellis'" }, { "id": 12272, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Other sporting goods retailing\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 12273, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 12274, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Counseling\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 12275, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Stephanie Rhodes\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 12276, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Riley Scott\" ) " }, { "id": 12277, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jamie Ellis\" ) " }, { "id": 12278, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 12279, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Patrick Jackson\"" }, { "id": 12280, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Ventilation cleaning\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 12281, "SQL": "select transaction_id from master_txn_table where product_service = \"Parking lot and driveway washing\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 12282, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 12283, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Christopher Berger\" order by transaction_date limit 1" }, { "id": 12284, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 12285, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Rebecca Rubio\" and transaction_type = 'invoice'" }, { "id": 12286, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Robert Mcneil\"" }, { "id": 12287, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by billing_city" }, { "id": 12288, "SQL": "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,\"Maintenance and Repairs\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 12289, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by billing_city" }, { "id": 12290, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Marie Wong\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 12291, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 12292, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') 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') group by billing_city" }, { "id": 12293, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Christopher Eaton\" and transaction_type = 'invoice'" }, { "id": 12294, "SQL": "select transaction_date from master_txn_table where customers = \"Peter Flores\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 12295, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 12296, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Daniel Henderson\"" }, { "id": 12297, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Emily Alvarez\" order by transaction_date limit 1" }, { "id": 12298, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Providing courses in computer programming\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 12299, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Phillip Torres\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') )" }, { "id": 12300, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Elizabeth Martinez\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 12301, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Care-planning services\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 12302, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 12303, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Julia Cobb\" ) " }, { "id": 12304, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Janet Hull\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") ) " }, { "id": 12305, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Jacob Armstrong\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 12306, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 12307, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Cassandra Lopez\" ) " }, { "id": 12308, "SQL": "select transaction_date 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 = \"Breeding\" order by transaction_date asc limit 1 " }, { "id": 12309, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Natasha Jackson\" ) " }, { "id": 12310, "SQL": "select sum(credit) from master_txn_table where product_service = \"Oxygen\" and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 12311, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Application Hosting\" " }, { "id": 12312, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Wind Power generation\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 12313, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Kylie Wheeler\" and transaction_type = 'payment' and 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') )" }, { "id": 12314, "SQL": "select transaction_date 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 = \"Investment\" order by transaction_date asc limit 1 " }, { "id": 12315, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 12316, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 12317, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Edward Villarreal\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) )" }, { "id": 12318, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Miranda Baker\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 12319, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Coffee and snack shops\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 12320, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ashley Oliver\" ) " }, { "id": 12321, "SQL": "select transaction_id from master_txn_table where customers = \"Patricia Phillips\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 12322, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Adrian White\" ) " }, { "id": 12323, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' 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') " }, { "id": 12324, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Angela Obrien\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 12325, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 12326, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Stacy Newman\" ) " }, { "id": 12327, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 12328, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Michael Lee\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 12329, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Summer Montoya\" ) " }, { "id": 12330, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Patricia Ward\" ) " }, { "id": 12331, "SQL": "select transaction_date 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 = \"Eucalyptus oil\" order by transaction_date asc limit 1 " }, { "id": 12332, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 12333, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Jeffrey Burns\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) ) " }, { "id": 12334, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 12335, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 12336, "SQL": "select transaction_date from master_txn_table where customers = \"Kristin Hill\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 12337, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Wholesaling railroad cars\") and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 12338, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Kaitlin Gibson\"" }, { "id": 12339, "SQL": "select transaction_id from master_txn_table where customers = \"Ryan Weber\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 12340, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Alexander Dennis\" ) " }, { "id": 12341, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Development of software products for PCs\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 12342, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Erica Jackson MD\"" }, { "id": 12343, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Frank Roth\"" }, { "id": 12344, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 12345, "SQL": "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,\"Retailing stationary sofas/sofa-sleepers\") and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 12346, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Natalie Carr\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 12347, "SQL": "select sum(credit) from master_txn_table where product_service = \"Tournaments and Matches\" and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 12348, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Office Expenses\") and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 12349, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Ross Coleman' or vendor = 'Ross Coleman'" }, { "id": 12350, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 12351, "SQL": "select avg(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 = \"Todd Stanley\" and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 12352, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Benjamin Flores\" order by transaction_date limit 1" }, { "id": 12353, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Theresa Melton\" and transaction_type = 'invoice'" }, { "id": 12354, "SQL": "select transaction_date 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 = \"Waste-fueled\" order by transaction_date asc limit 1 " }, { "id": 12355, "SQL": "select transaction_date 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 = \"Livestock\" order by transaction_date asc limit 1 " }, { "id": 12356, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Vanessa Anderson\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 12357, "SQL": "select transaction_date 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 = \"Dining\" order by transaction_date asc limit 1 " }, { "id": 12358, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date) AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 12359, "SQL": "select transaction_date 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 = \"Coordinators\" order by transaction_date asc limit 1 " }, { "id": 12360, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 12361, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"John Vincent\" ) " }, { "id": 12362, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Kathryn Wells\"" }, { "id": 12363, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Popular music shows\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 12364, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 12365, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Recognition software for the auto sector\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 12366, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Providing support services for financial\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 12367, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Christopher Hoffman\" ) " }, { "id": 12368, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 12369, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Cody Clay\" and transaction_type = 'invoice'" }, { "id": 12370, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 12371, "SQL": "select transaction_date 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 = \"Non-renewable\" order by transaction_date asc limit 1 " }, { "id": 12372, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 12373, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Adam Wallace II\" ) " }, { "id": 12374, "SQL": "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\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 12375, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Campground and RV park services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 12376, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Patricia Peterson\" ) " }, { "id": 12377, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Alan Fernandez\" ) " }, { "id": 12378, "SQL": "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 = \"Lisa Green\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 12379, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 12380, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 12381, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Samantha Stone\" ) " }, { "id": 12382, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Phillip Garrison' or vendor = 'Phillip Garrison'" }, { "id": 12383, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 12384, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Samantha Kane\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 12385, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Parking lot and driveway washing\" " }, { "id": 12386, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 12387, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 12388, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sherri Hernandez\" ) " }, { "id": 12389, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Nathan Newman\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 12390, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"April Hughes\" ) " }, { "id": 12391, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kyle West\" ) " }, { "id": 12392, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brian Prince\" ) " }, { "id": 12393, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Benjamin Chambers\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 12394, "SQL": "select transaction_date 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 = \"Hacking Training\" order by transaction_date asc limit 1 " }, { "id": 12395, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Uncategorized Expense\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 12396, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Olivia Hardy\" ) " }, { "id": 12397, "SQL": "select transaction_date 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 = \"Saddlery\" order by transaction_date asc limit 1 " }, { "id": 12398, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Charles Thomas\" order by transaction_date limit 1" }, { "id": 12399, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Evelyn Gordon\" ) " }, { "id": 12400, "SQL": "select transaction_id from master_txn_table where customers = \"April Aguirre\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 12401, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Theresa Barnes\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") ) " }, { "id": 12402, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Robert Brewer\" ) " }, { "id": 12403, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by billing_city" }, { "id": 12404, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Judith Miller\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 12405, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Margaret Figueroa\" order by transaction_date limit 1" }, { "id": 12406, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Mikayla White\"" }, { "id": 12407, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Decks and Patios\") and vendor = \"Travis Williams\"" }, { "id": 12408, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Terry Bradford\" ) " }, { "id": 12409, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 12410, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"David Fox\" ) " }, { "id": 12411, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 12412, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Stanley Sullivan\" ) " }, { "id": 12413, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 12414, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Office Expenses\") and vendor = \"Hannah Davis\"" }, { "id": 12415, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Julia Reilly\" ) " }, { "id": 12416, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Paul Walters\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 12417, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 12418, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by billing_city" }, { "id": 12419, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Rent or Lease\") and vendor = \"Michael Miller\"" }, { "id": 12420, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kimberly Werner\" ) " }, { "id": 12421, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Xavier Fleming\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) )" }, { "id": 12422, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Legal & Professional Fees\") and vendor = \"Jesse Bender\"" }, { "id": 12423, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Ethan Edwards\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) )" }, { "id": 12424, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 12425, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Boat, ship and steamship rental or leasing\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 12426, "SQL": "select max(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 = \"Caroline Stephens\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 12427, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 12428, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Lori Huang\" order by transaction_date limit 1" }, { "id": 12429, "SQL": "select transaction_date 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 = \"Bowling\" order by transaction_date asc limit 1 " }, { "id": 12430, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jennifer Castillo\" ) " }, { "id": 12431, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Andrea Vargas\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 12432, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Donna Davis\" order by transaction_date limit 1" }, { "id": 12433, "SQL": "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 accommodation services\") and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 12434, "SQL": "select transaction_date 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 = \"Contracts\" order by transaction_date asc limit 1 " }, { "id": 12435, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Manufacturing other Natural oils\") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 12436, "SQL": "select transaction_id from master_txn_table where product_service = \"Coal Pwer\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 12437, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Tamara Carr\" order by transaction_date limit 1" }, { "id": 12438, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 12439, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Deanna Lopez\" ) " }, { "id": 12440, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 12441, "SQL": "select transaction_id from master_txn_table where customers = \"Lisa Butler\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 12442, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jeremiah Hanna\" order by transaction_date limit 1" }, { "id": 12443, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 12444, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Farrier services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 12445, "SQL": "select transaction_date 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 = \"Distressed Securities\" order by transaction_date asc limit 1 " }, { "id": 12446, "SQL": "select transaction_date 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\" order by transaction_date asc limit 1 " }, { "id": 12447, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Lori Hicks\" and transaction_type = 'invoice'" }, { "id": 12448, "SQL": "select transaction_date from master_txn_table where customers = \"Judy Warren\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 12449, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Johnny Casey\" ) " }, { "id": 12450, "SQL": "select transaction_id from master_txn_table where customers = \"Annette Payne\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 12451, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Jeffrey Fitzpatrick\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 12452, "SQL": "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,\"Office Expenses\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 12453, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Jose Elliott\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 12454, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"David Morton\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 12455, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Anna Stewart\" and transaction_type = 'invoice'" }, { "id": 12456, "SQL": "select sum(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Web hosting\" " }, { "id": 12457, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by billing_city" }, { "id": 12458, "SQL": "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,\"Reprographic services\") and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 12459, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Karen Thomas\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 12460, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jeffrey Thompson\" ) " }, { "id": 12461, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 12462, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Design and management services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 12463, "SQL": "select transaction_id from master_txn_table where product_service = \"Medical services\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 12464, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Cameron Abbott\" order by transaction_date limit 1" }, { "id": 12465, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Rebecca Garza MD\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 12466, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Joshua Crawford\" ) " }, { "id": 12467, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Adam James\" and transaction_type = 'invoice'" }, { "id": 12468, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jennifer Gonzalez\" ) " }, { "id": 12469, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Wendy Oneill\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") ) " }, { "id": 12470, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Forestry Machinery\" " }, { "id": 12471, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Natalie Nichols\" ) " }, { "id": 12472, "SQL": "select transaction_date from master_txn_table where customers = \"Monica Lewis\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 12473, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Chelsea Lee\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 12474, "SQL": "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,\"Retailing master bedroom furniture\") and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 12475, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Lindsey Garza\"" }, { "id": 12476, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) group by billing_city" }, { "id": 12477, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 12478, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Richard Snyder\" ) " }, { "id": 12479, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Katherine Baker\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 12480, "SQL": "select avg(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 = \"Chelsea Patrick\" and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 12481, "SQL": "select transaction_date from master_txn_table where customers = \"Cory Cannon\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 12482, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Henry Kramer\" ) " }, { "id": 12483, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Casey Davis MD\" ) " }, { "id": 12484, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Kevin Foster\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 12485, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Amber Mccormick\"" }, { "id": 12486, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Child abuse prevention services\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 12487, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Willie Hill\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 12488, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Joseph Woodard\" and transaction_type = 'payment' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') ) " }, { "id": 12489, "SQL": "select transaction_id from master_txn_table where customers = \"Russell Long\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 12490, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Connor Rodriguez\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') ) " }, { "id": 12491, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Amanda Williams\" order by transaction_date limit 1" }, { "id": 12492, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 12493, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 12494, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 12495, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 12496, "SQL": "select sum(credit) from master_txn_table where product_service = \"Dance\" and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 12497, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Anna Bond\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 12498, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brian Romero\" ) " }, { "id": 12499, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') and account_type in ('Expense','Other Expense') " }, { "id": 12500, "SQL": "select max(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 = \"Chad Alvarez\" and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 12501, "SQL": "select transaction_date 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 = \"License fees\" order by transaction_date asc limit 1 " }, { "id": 12502, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Kathryn Mcintosh\" order by transaction_date limit 1" }, { "id": 12503, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Juan Combs\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') ) " }, { "id": 12504, "SQL": "select transaction_date from master_txn_table where customers = \"Aaron Ross\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 12505, "SQL": "select sum(credit) from master_txn_table where product_service = \"Duct and gutter cleaning\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 12506, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Telephone\") and 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') " }, { "id": 12507, "SQL": "select min(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 = \"Carol Thomas\" and 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') " }, { "id": 12508, "SQL": "select transaction_date 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 = \"high-rise and low-rise buildings\" order by transaction_date asc limit 1 " }, { "id": 12509, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Alexandria Campbell\" ) " }, { "id": 12510, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by billing_city" }, { "id": 12511, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 12512, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Automobile\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 12513, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Housing\" " }, { "id": 12514, "SQL": "select transaction_date from master_txn_table where customers = \"Marcus Castillo\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 12515, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Cynthia Collins\" ) " }, { "id": 12516, "SQL": "select transaction_date 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 = \"Tournaments and Matches\" order by transaction_date asc limit 1 " }, { "id": 12517, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 12518, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Parking lot and driveway washing\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 12519, "SQL": "select transaction_date from master_txn_table where customers = \"Tyler Romero\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 12520, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Seth Crawford\" ) " }, { "id": 12521, "SQL": "select sum(credit) from master_txn_table where product_service = \"Meal\" 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') " }, { "id": 12522, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Richard Wall\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) )" }, { "id": 12523, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jacob Long\" ) " }, { "id": 12524, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 12525, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 12526, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 12527, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Nancy Erickson\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 12528, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 12529, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sherri Stephens\" ) " }, { "id": 12530, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Sleepers\" " }, { "id": 12531, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) group by billing_city" }, { "id": 12532, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"James Turner MD\" ) " }, { "id": 12533, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') group by product_service order by sum(credit) desc limit 1" }, { "id": 12534, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 12535, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 12536, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Job Materials\") and vendor = \"George Edwards\"" }, { "id": 12537, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 12538, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 12539, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Tyler Hampton\" ) " }, { "id": 12540, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Elizabeth Phillips\" and transaction_type = 'invoice'" }, { "id": 12541, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Lisa James\" and transaction_type = 'invoice'" }, { "id": 12542, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Kathy Grant' or vendor = 'Kathy Grant'" }, { "id": 12543, "SQL": "select transaction_id from master_txn_table where customers = \"Ryan David\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 12544, "SQL": "select transaction_date 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 = \"Brokerage\" order by transaction_date asc limit 1 " }, { "id": 12545, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Jeffrey Reyes\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) ) " }, { "id": 12546, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Steven Steele\"" }, { "id": 12547, "SQL": "select transaction_id from master_txn_table where product_service = \"Carbon dioxide\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 12548, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Anthony Henderson DDS' or vendor = 'Anthony Henderson DDS'" }, { "id": 12549, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') order by sum(debit) desc limit 1" }, { "id": 12550, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 12551, "SQL": "select transaction_id from master_txn_table where customers = \"Jessica Rose\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 12552, "SQL": "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 marine supplies (except pleasure)\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 12553, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 12554, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Rhonda Davis\" ) " }, { "id": 12555, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Logan Hart\" ) " }, { "id": 12556, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Erin Barnes\" ) " }, { "id": 12557, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Amber Roberson\" ) " }, { "id": 12558, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Athletic uniforms retailing\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 12559, "SQL": "select transaction_date from master_txn_table where customers = \"Jamie Hernandez\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 12560, "SQL": "select transaction_date from master_txn_table where customers = \"Monica Watson\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 12561, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Elizabeth Elliott' or vendor = 'Elizabeth Elliott'" }, { "id": 12562, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ricardo Dominguez\" ) " }, { "id": 12563, "SQL": "select transaction_date from master_txn_table where customers = \"Tiffany Drake\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 12564, "SQL": "select max(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 = \"Amanda Chen\" and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 12565, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') group by billing_city" }, { "id": 12566, "SQL": "select transaction_date from master_txn_table where customers = \"Catherine Kaiser\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 12567, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') group by billing_city" }, { "id": 12568, "SQL": "select transaction_date 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 = \"Brokerage\" order by transaction_date asc limit 1 " }, { "id": 12569, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Catherine Perry\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 12570, "SQL": "select transaction_id from master_txn_table where product_service = \"Drinking and Special Food\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 12571, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Retailing home office furniture\") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 12572, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sherri Diaz DDS\" ) " }, { "id": 12573, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") order by sum(debit) desc limit 1" }, { "id": 12574, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Abigail Mack\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 12575, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Stephanie Welch\" order by transaction_date limit 1" }, { "id": 12576, "SQL": "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,\"Blueprinting services\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 12577, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Macro\" " }, { "id": 12578, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Debra Gardner\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 12579, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Zachary Kennedy\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') ) " }, { "id": 12580, "SQL": "select transaction_date from master_txn_table where customers = \"Eric Reyes\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 12581, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Carl Barton\" ) " }, { "id": 12582, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Melissa Todd\" ) " }, { "id": 12583, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Uncategorized Expense\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 12584, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 12585, "SQL": "select transaction_date from master_txn_table where customers = \"Benjamin Fuentes\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 12586, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 12587, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 12588, "SQL": "select transaction_id from master_txn_table where product_service = \"Counseling\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 12589, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Travel\") 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') " }, { "id": 12590, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 12591, "SQL": "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,\"Daily living assistance\") and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 12592, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 12593, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by billing_city" }, { "id": 12594, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 12595, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Adam Osborn\" ) " }, { "id": 12596, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') group by billing_city" }, { "id": 12597, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Rebecca Collins\" ) " }, { "id": 12598, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Wholesaling aeronautical equipment and supplies\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 12599, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jessica Bell\" ) " }, { "id": 12600, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brian Richards\" ) " }, { "id": 12601, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kelly Wallace\" ) " }, { "id": 12602, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Brianna Miller' or vendor = 'Brianna Miller'" }, { "id": 12603, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Randy Ramos\" and transaction_type = 'invoice'" }, { "id": 12604, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Motorbike \") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 12605, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Anne Hunter\"" }, { "id": 12606, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Judy Bradley\"" }, { "id": 12607, "SQL": "select transaction_date 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 = \"environmental projects\" order by transaction_date asc limit 1 " }, { "id": 12608, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 12609, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Bicycle retailing\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 12610, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 12611, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Heather Burnett\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 12612, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 12613, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 12614, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Workers Compensation\") and vendor = \"Vanessa Snyder\"" }, { "id": 12615, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Maurice Smith\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') )" }, { "id": 12616, "SQL": "select transaction_date from master_txn_table where customers = \"Anna Gentry\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 12617, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Lawrence Johnson MD\" order by transaction_date limit 1" }, { "id": 12618, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jeffrey Knight\" ) " }, { "id": 12619, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 12620, "SQL": "select avg(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 = \"Keith Wright\" and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 12621, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 12622, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') order by sum(debit) desc limit 1" }, { "id": 12623, "SQL": "select product_service, 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 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') group by product_service order by sum(credit) desc limit 1" }, { "id": 12624, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Cynthia Hopkins\"" }, { "id": 12625, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by billing_city" }, { "id": 12626, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 12627, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Bryan Mccoy\" ) " }, { "id": 12628, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 12629, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Ventilation cleaning\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 12630, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 12631, "SQL": "select transaction_date from master_txn_table where customers = \"Tanya Woods\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 12632, "SQL": "select avg(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 = \"Phillip Howell\" and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 12633, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Sherry Reynolds\" order by transaction_date limit 1" }, { "id": 12634, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Richard Park\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 12635, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 12636, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 12637, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 12638, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') group by billing_city" }, { "id": 12639, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") group by product_service order by sum(credit) desc limit 1" }, { "id": 12640, "SQL": "select transaction_date 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 = \"Macs\" order by transaction_date asc limit 1 " }, { "id": 12641, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Dustin Holmes\" ) " }, { "id": 12642, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"William Carlson\" ) " }, { "id": 12643, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Ashlee Romero DDS\"" }, { "id": 12644, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 12645, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 12646, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Stacey Lopez\" and account_type in ('Expense','Other Expense') and 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') " }, { "id": 12647, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Victor Lewis\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 12648, "SQL": "select transaction_date 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 = \"Non-renewable\" order by transaction_date asc limit 1 " }, { "id": 12649, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Kevin Young\"" }, { "id": 12650, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Veronica Knox\" ) " }, { "id": 12651, "SQL": "select transaction_date 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 = \"Youth guidance\" order by transaction_date asc limit 1 " }, { "id": 12652, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Jonathan Richard\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 12653, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") order by sum(debit) desc limit 1" }, { "id": 12654, "SQL": "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 = \"James Harper\" and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 12655, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Maintenance and Repairs\") and vendor = \"Holly Mcneil\"" }, { "id": 12656, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Manuel Lloyd\" ) " }, { "id": 12657, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Christopher Clarke\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 12658, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Aaron Lee\"" }, { "id": 12659, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 12660, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 12661, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Stephanie Boyd\" order by transaction_date limit 1" }, { "id": 12662, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Orange oil\" " }, { "id": 12663, "SQL": "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,\"Photocopying services\") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 12664, "SQL": "select transaction_date from master_txn_table where customers = \"Jasmin Jones\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 12665, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Thomas Kemp\"" }, { "id": 12666, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 12667, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Anthony Parsons\" ) " }, { "id": 12668, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Kylie Jensen\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') ) " }, { "id": 12669, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Roberto Peterson\"" }, { "id": 12670, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Unapplied Cash Payment Income\") and 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') " }, { "id": 12671, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') and account_type in ('Expense','Other Expense') " }, { "id": 12672, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Services\" " }, { "id": 12673, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Dustin Simmons\" ) " }, { "id": 12674, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Natalie Pacheco\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') ) " }, { "id": 12675, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Dennis Walker\" ) " }, { "id": 12676, "SQL": "select transaction_id from master_txn_table where customers = \"Peter Paul\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 12677, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Christine Martinez\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 12678, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jesse Morgan\" order by transaction_date limit 1" }, { "id": 12679, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Rachel Wilson\" ) " }, { "id": 12680, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Monica Freeman\" ) " }, { "id": 12681, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 12682, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Timothy Holland\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 12683, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 12684, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 12685, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 12686, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Amy Burns\"" }, { "id": 12687, "SQL": "select sum(credit) from master_txn_table where product_service = \"Training\" and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 12688, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Musicians\" " }, { "id": 12689, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brent Gould\" ) " }, { "id": 12690, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') order by sum(debit) desc limit 1" }, { "id": 12691, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Bobby Krause\" ) " }, { "id": 12692, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Physical therapy\") and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 12693, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Wendy Suarez\" ) " }, { "id": 12694, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Joseph Rowe\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 12695, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Alexander Kim\" order by transaction_date limit 1" }, { "id": 12696, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Mary Lawrence\" order by transaction_date limit 1" }, { "id": 12697, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 12698, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Karen Greene\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 12699, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Martin Ford\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) ) " }, { "id": 12700, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Taylor Hahn\" ) " }, { "id": 12701, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Holly Davies\" order by transaction_date limit 1" }, { "id": 12702, "SQL": "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,\"Quality management assessment\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 12703, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 12704, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Carolyn Ortiz\" ) " }, { "id": 12705, "SQL": "select transaction_date from master_txn_table where customers = \"Jeffrey Blackwell\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 12706, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Walter Howard\" ) " }, { "id": 12707, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 12708, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Vincent Hayden\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 12709, "SQL": "select sum(credit) from master_txn_table where product_service = \"Packing\" and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 12710, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Organic Gases\" " }, { "id": 12711, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Michael Hoover\" ) " }, { "id": 12712, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Cheryl Gross\" ) " }, { "id": 12713, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 12714, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') order by sum(debit) desc limit 1" }, { "id": 12715, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 12716, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Providing loading and unloading services at rail terminals\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 12717, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 12718, "SQL": "select transaction_date from master_txn_table where customers = \"Amy Nguyen\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 12719, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Joshua Davis\" ) " }, { "id": 12720, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Daniel Lewis\" ) " }, { "id": 12721, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 12722, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Amy Hood\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 12723, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Daisy Bell\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 12724, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Jennifer Harvey\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 12725, "SQL": "select transaction_date from master_txn_table where customers = \"Gary Melton\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 12726, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') and account_type in ('Expense','Other Expense') " }, { "id": 12727, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Clifford Carter\" ) " }, { "id": 12728, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Adrian Lane\" ) " }, { "id": 12729, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 12730, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 12731, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') group by product_service order by sum(credit) desc limit 1" }, { "id": 12732, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Bill Patel\" and transaction_type = 'payment' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') )" }, { "id": 12733, "SQL": "select sum(credit) from master_txn_table where product_service = \"Therapy\" and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 12734, "SQL": "select max(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 = \"Brooke Wright\" and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 12735, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Leslie Lopez\" ) " }, { "id": 12736, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Darryl Jackson\" ) " }, { "id": 12737, "SQL": "select max(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 = \"Richard Maldonado\" and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 12738, "SQL": "select sum(credit) from master_txn_table where product_service = \"Waste-fueled\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 12739, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 12740, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Tracey Murphy\" ) " }, { "id": 12741, "SQL": "select avg(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 = \"Martin White\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 12742, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 12743, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Dustin Bird' or vendor = 'Dustin Bird'" }, { "id": 12744, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"John Galloway\" and transaction_type = 'payment' 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') )" }, { "id": 12745, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Job Materials\") and vendor = \"Jeffrey Barton\"" }, { "id": 12746, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') group by billing_city" }, { "id": 12747, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ronald Burton\" ) " }, { "id": 12748, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 12749, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Quality management accreditation\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 12750, "SQL": "select transaction_id from master_txn_table where customers = \"Michael Bowen\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 12751, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Caitlyn Jackson\" ) " }, { "id": 12752, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Billy Clark\" order by transaction_date limit 1" }, { "id": 12753, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Melissa Martinez\"" }, { "id": 12754, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') order by sum(debit) desc limit 1" }, { "id": 12755, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Charles Gould\" ) " }, { "id": 12756, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 12757, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Nicholas Henry\"" }, { "id": 12758, "SQL": "select min(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 = \"Casey Webb\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 12759, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Thomas George\" ) " }, { "id": 12760, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Olivia Price\" ) " }, { "id": 12761, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Julie Moore\" order by transaction_date limit 1" }, { "id": 12762, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Morgan Soto\" ) " }, { "id": 12763, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 12764, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Keith Austin\" ) " }, { "id": 12765, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Monica Suarez\" ) " }, { "id": 12766, "SQL": "select distinct transaction_id from master_txn_table where customers = \"James Guzman\"" }, { "id": 12767, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Bianca Smith' or vendor = 'Bianca Smith'" }, { "id": 12768, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Michael Rodgers' or vendor = 'Michael Rodgers'" }, { "id": 12769, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 12770, "SQL": "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 = \"Aaron Gomez\" 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') " }, { "id": 12771, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Jeffrey Craig\"" }, { "id": 12772, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Providing courses through business schools\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 12773, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jacqueline Turner\" ) " }, { "id": 12774, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 12775, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 12776, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Jennifer Morse' or vendor = 'Jennifer Morse'" }, { "id": 12777, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Dylan Grimes\" order by transaction_date limit 1" }, { "id": 12778, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Christopher Shaw\"" }, { "id": 12779, "SQL": "select sum(credit) from master_txn_table where product_service = \"Recreational programs\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 12780, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Austin Guerrero\"" }, { "id": 12781, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Mark Nguyen\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 12782, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Austin Ramos\" ) " }, { "id": 12783, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date) AND date(current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 12784, "SQL": "select transaction_date from master_txn_table where customers = \"Denise Ward\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 12785, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Antonio Molina\"" }, { "id": 12786, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 12787, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Sarah Hodges' or vendor = 'Sarah Hodges'" }, { "id": 12788, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Other accommodation services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 12789, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 12790, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Adrian Lane\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 12791, "SQL": "select transaction_id from master_txn_table where product_service = \"Well casings\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 12792, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 12793, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Brenda Norton\" order by transaction_date limit 1" }, { "id": 12794, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Elizabeth Franklin\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 12795, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Youth guidance services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 12796, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Stephen Mcclure\"" }, { "id": 12797, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Child abuse prevention services\") and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 12798, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by billing_city" }, { "id": 12799, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Angel Malone\" and transaction_type = 'invoice'" }, { "id": 12800, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Robert Taylor\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 12801, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Joshua Salinas\" order by transaction_date limit 1" }, { "id": 12802, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 12803, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Coal Pwer\" " }, { "id": 12804, "SQL": "select transaction_date 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 = \"Industrial manufacturing\" order by transaction_date asc limit 1 " }, { "id": 12805, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Lori Wagner\" order by transaction_date limit 1" }, { "id": 12806, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Supplies\") and vendor = \"Melissa Hunter\"" }, { "id": 12807, "SQL": "select transaction_id from master_txn_table where customers = \"Jennifer Nielsen\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 12808, "SQL": "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,\"Boat, ship and steamship rental or leasing\") and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 12809, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 12810, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 12811, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 12812, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') order by sum(debit) desc limit 1" }, { "id": 12813, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Annette Anderson\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 12814, "SQL": "select transaction_id from master_txn_table where customers = \"Brittany Rose DDS\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 12815, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") and account_type in ('Expense','Other Expense') " }, { "id": 12816, "SQL": "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,\"Retailing Sleepers\") and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 12817, "SQL": "select transaction_date from master_txn_table where customers = \"Kathy Collins\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 12818, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Christopher Harmon\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') ) " }, { "id": 12819, "SQL": "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,\"Railcar rental or leasing\") and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 12820, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Patrick Hunter\" ) " }, { "id": 12821, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 12822, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Alexis Haley\" ) " }, { "id": 12823, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Sheila Rodriguez\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 12824, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Nicole Payne\" ) " }, { "id": 12825, "SQL": "select min(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 = \"Brian Brennan\" and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 12826, "SQL": "select transaction_id from master_txn_table where customers = \"Mercedes Chen\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 12827, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') group by billing_city" }, { "id": 12828, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Nicholas Thompson\" ) " }, { "id": 12829, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Games\" " }, { "id": 12830, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Brad Padilla\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') ) " }, { "id": 12831, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date) AND date(current_date) group by billing_city" }, { "id": 12832, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 12833, "SQL": "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,\"Metal ore exploration\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 12834, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Robert Carr\" ) " }, { "id": 12835, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Patricia Malone\" ) " }, { "id": 12836, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' 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') " }, { "id": 12837, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 12838, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date) AND date(current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 12839, "SQL": "select transaction_date from master_txn_table where customers = \"Cody Pope\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 12840, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Zachary Stuart\"" }, { "id": 12841, "SQL": "select sum(credit) from master_txn_table where product_service = \"Aircraft\" and 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') " }, { "id": 12842, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Melissa Brennan\"" }, { "id": 12843, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Zachary Patel\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') ) " }, { "id": 12844, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Boat, ship and steamship rental or leasing\") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 12845, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 12846, "SQL": "select transaction_date from master_txn_table where customers = \"Crystal Hoover\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 12847, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kimberly Ware\" ) " }, { "id": 12848, "SQL": "select transaction_date 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 = \"Catering\" order by transaction_date asc limit 1 " }, { "id": 12849, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Meagan Howard\"" }, { "id": 12850, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Anna Torres\" ) " }, { "id": 12851, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Kaitlyn Mata\" order by transaction_date limit 1" }, { "id": 12852, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"William Frederick\" ) " }, { "id": 12853, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 12854, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Providing independent operation of railroad terminals\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 12855, "SQL": "select transaction_date from master_txn_table where customers = \"Tamara Torres\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 12856, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by billing_city" }, { "id": 12857, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') order by sum(debit) desc limit 1" }, { "id": 12858, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Unapplied Cash Bill Payment Expense\") and vendor = \"Richard Graham\"" }, { "id": 12859, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 12860, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Catering services\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 12861, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Dairy support services\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 12862, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 12863, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 12864, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Repair & Maintenance (deleted)\") and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 12865, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jamie Blair\" ) " }, { "id": 12866, "SQL": "select product_service, 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 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') group by product_service order by sum(credit) desc limit 1" }, { "id": 12867, "SQL": "select transaction_id from master_txn_table where customers = \"Kathy Johnson\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 12868, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Victoria Ross\" ) " }, { "id": 12869, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Calvin Le\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 12870, "SQL": "select transaction_date from master_txn_table where customers = \"Brittany Perez\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 12871, "SQL": "select transaction_date from master_txn_table where customers = \"Shaun Byrd\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 12872, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date) AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 12873, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Benjamin Obrien\" ) " }, { "id": 12874, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Angela Rodriguez\" and transaction_type = 'invoice'" }, { "id": 12875, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Database management\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 12876, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Shawn Thompson\" ) " }, { "id": 12877, "SQL": "select transaction_date 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 = \"Copying\" order by transaction_date asc limit 1 " }, { "id": 12878, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ethan Cowan\" ) " }, { "id": 12879, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Shannon Hamilton' or vendor = 'Shannon Hamilton'" }, { "id": 12880, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by billing_city" }, { "id": 12881, "SQL": "select transaction_date 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 = \"Golf Courses\" order by transaction_date asc limit 1 " }, { "id": 12882, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"John Bartlett\" order by transaction_date limit 1" }, { "id": 12883, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Duane Higgins\"" }, { "id": 12884, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Carolyn Thompson\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) )" }, { "id": 12885, "SQL": "select transaction_id from master_txn_table where customers = \"Shannon Ramirez\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 12886, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Blueprinting services\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 12887, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Duct and gutter cleaning\") and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 12888, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 12889, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 12890, "SQL": "select product_service, 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 transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') group by product_service order by sum(credit) desc limit 1" }, { "id": 12891, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Stephen Brennan\" ) " }, { "id": 12892, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Edward Hendricks\" and account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 12893, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Gregory Mueller\" order by transaction_date limit 1" }, { "id": 12894, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kyle Ali\" ) " }, { "id": 12895, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Riley Montgomery MD\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') ) " }, { "id": 12896, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 12897, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Randy Schroeder\" order by transaction_date limit 1" }, { "id": 12898, "SQL": "select transaction_date 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 = \"Meals\" order by transaction_date asc limit 1 " }, { "id": 12899, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Stationery & Printing\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 12900, "SQL": "select max(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 = \"Anthony Woodard\" and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 12901, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kristen French\" ) " }, { "id": 12902, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Carl Murphy\" ) " }, { "id": 12903, "SQL": "select avg(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 = \"Francis Aguilar MD\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 12904, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Amy Sanchez\" ) " }, { "id": 12905, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 12906, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Joanna Dalton\" ) " }, { "id": 12907, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Dominique Gallagher\" order by transaction_date limit 1" }, { "id": 12908, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Athletic uniforms retailing\") and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 12909, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 12910, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 12911, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jeffrey Rodriguez\" ) " }, { "id": 12912, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Dana Kennedy\" ) " }, { "id": 12913, "SQL": "select transaction_date 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 = \"Nitrogen\" order by transaction_date asc limit 1 " }, { "id": 12914, "SQL": "select transaction_date 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 = \"Brokerage\" order by transaction_date asc limit 1 " }, { "id": 12915, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sherry Drake\" ) " }, { "id": 12916, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Baby apparel and shoes\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 12917, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 12918, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 12919, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Wholesaling aeronautical equipment and supplies\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 12920, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 12921, "SQL": "select transaction_id from master_txn_table where product_service = \"Golf Equipment\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 12922, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Carolyn Miller\"" }, { "id": 12923, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Gilbert Cameron\"" }, { "id": 12924, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 12925, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Janice Cohen\" and transaction_type = 'invoice'" }, { "id": 12926, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Emily Fitzpatrick\" order by transaction_date limit 1" }, { "id": 12927, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') group by billing_city" }, { "id": 12928, "SQL": "select transaction_id from master_txn_table where customers = \"Sean Lewis\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 12929, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Daniel Bush\" ) " }, { "id": 12930, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 12931, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date) AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 12932, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 12933, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 12934, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Laura Moore\"" }, { "id": 12935, "SQL": "select product_service, 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 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') group by product_service order by sum(credit) desc limit 1" }, { "id": 12936, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"David White\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 12937, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 12938, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') group by billing_city" }, { "id": 12939, "SQL": "select transaction_date from master_txn_table where customers = \"Crystal Cantrell\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 12940, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 12941, "SQL": "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,\"Barge rental or leasing\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 12942, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jennifer Valdez\" ) " }, { "id": 12943, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 12944, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jackson Roberts\" ) " }, { "id": 12945, "SQL": "select transaction_id from master_txn_table where customers = \"Randy Wall\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 12946, "SQL": "select transaction_date from master_txn_table where customers = \"Joshua Crawford\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 12947, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Dylan Turner\" order by transaction_date limit 1" }, { "id": 12948, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by billing_city" }, { "id": 12949, "SQL": "select transaction_id from master_txn_table where customers = \"Pamela Mckee\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 12950, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Tracy Schmidt\" ) " }, { "id": 12951, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 12952, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Karla Cunningham\" ) " }, { "id": 12953, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and 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') order by sum(debit) desc limit 1" }, { "id": 12954, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Lisa Peterson\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) ) " }, { "id": 12955, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 12956, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Coffee and snack shops\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 12957, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Steven Dixon' or vendor = 'Steven Dixon'" }, { "id": 12958, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Sandra Simmons' or vendor = 'Sandra Simmons'" }, { "id": 12959, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Samantha Fletcher\" ) " }, { "id": 12960, "SQL": "select transaction_date from master_txn_table where customers = \"Chase Wells\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 12961, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Repairing locomotives and railcars (except factory conversion, overhaul and rebuilding)\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 12962, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Nicole Vang\" ) " }, { "id": 12963, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Michael Chapman\" and transaction_type = 'invoice'" }, { "id": 12964, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 12965, "SQL": "select transaction_date from master_txn_table where customers = \"Christopher Morrow\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 12966, "SQL": "select min(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 = \"Thomas Mitchell\" and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 12967, "SQL": "select transaction_date 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 = \"Biomass electricity\" order by transaction_date asc limit 1 " }, { "id": 12968, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 12969, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ashley Nelson\" ) " }, { "id": 12970, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 12971, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Eric Becker\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 12972, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Connie Kelly\" and transaction_type = 'invoice'" }, { "id": 12973, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Steven Mendoza\" ) " }, { "id": 12974, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Amy Maynard\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') )" }, { "id": 12975, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ashley Norris\" ) " }, { "id": 12976, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 12977, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Process management\") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 12978, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Randy Bell\" ) " }, { "id": 12979, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kimberly Hardin\" ) " }, { "id": 12980, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Jessica Miller\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') ) " }, { "id": 12981, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 12982, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Dennis Kelley\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) ) " }, { "id": 12983, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Courtney Reed PhD\" order by transaction_date limit 1" }, { "id": 12984, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') group by billing_city" }, { "id": 12985, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Kayla Hill\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 12986, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Ceremony & reception venue\") 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') " }, { "id": 12987, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Social Service\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 12988, "SQL": "select max(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 = \"Joseph Chung\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 12989, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Karen Stewart\" ) " }, { "id": 12990, "SQL": "select transaction_date 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 = \"Software Training\" order by transaction_date asc limit 1 " }, { "id": 12991, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 12992, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Catering services\") and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 12993, "SQL": "select sum(credit) from master_txn_table where product_service = \"Home care\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 12994, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") order by sum(debit) desc limit 1" }, { "id": 12995, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jeremy Smith\" ) " }, { "id": 12996, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Application service provisioning\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 12997, "SQL": "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,\"Duct and gutter cleaning\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 12998, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Jeffrey Schneider\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date) AND date(current_date) ) " }, { "id": 12999, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Adam Torres\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 13000, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Farrier services\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 13001, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Cost of Labor\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 13002, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 13003, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Bank Charges\") and vendor = \"Richard Park\"" }, { "id": 13004, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 13005, "SQL": "select transaction_date 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 = \"Contract\" order by transaction_date asc limit 1 " }, { "id": 13006, "SQL": "select transaction_date from master_txn_table where customers = \"James Smith\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 13007, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Uncategorized Expense\") and vendor = \"Tara Pittman\"" }, { "id": 13008, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Destiny Wagner\" ) " }, { "id": 13009, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jose Gonzalez\" ) " }, { "id": 13010, "SQL": "select transaction_date 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 = \"Mobile Device\" order by transaction_date asc limit 1 " }, { "id": 13011, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 13012, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 13013, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Amy Bradley\" ) " }, { "id": 13014, "SQL": "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\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 13015, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Amanda Martin\"" }, { "id": 13016, "SQL": "select transaction_date 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 = \"Railroad Cars\" order by transaction_date asc limit 1 " }, { "id": 13017, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Office Expenses\") and vendor = \"Christopher Taylor\"" }, { "id": 13018, "SQL": "select transaction_id from master_txn_table where customers = \"Daniel Anthony\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 13019, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Amanda Adams\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) ) " }, { "id": 13020, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Daniel Foster\" ) " }, { "id": 13021, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Window washing\" " }, { "id": 13022, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Hunter Roth\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 13023, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Timothy Sanchez\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 13024, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Erika May\" ) " }, { "id": 13025, "SQL": "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 financing related to securities\") and 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') " }, { "id": 13026, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jeffrey Prince DVM\" ) " }, { "id": 13027, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 13028, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Christina Dougherty\" ) " }, { "id": 13029, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Rebecca Brown\" ) " }, { "id": 13030, "SQL": "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 = \"Jenna Pratt\" and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 13031, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Attire and accessories\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 13032, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Angela Oneal\"" }, { "id": 13033, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Crystal Scott\" ) " }, { "id": 13034, "SQL": "select sum(credit) from master_txn_table where product_service = \"Financial Investment\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 13035, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and 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') order by sum(debit) desc limit 1" }, { "id": 13036, "SQL": "select sum(credit) from master_txn_table where product_service = \"Youth community\" and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 13037, "SQL": "select transaction_id from master_txn_table where product_service = \"Bangalow\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 13038, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Andrew Glass MD\"" }, { "id": 13039, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Nicole Gilbert\" ) " }, { "id": 13040, "SQL": "select min(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 = \"Kathy Chambers\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 13041, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Tim Knox\" and transaction_type = 'invoice'" }, { "id": 13042, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Adam Rich\" ) " }, { "id": 13043, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Roger Beltran\" ) " }, { "id": 13044, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Jacqueline Chambers\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 13045, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Saddlery retailing\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 13046, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"James Russell\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') )" }, { "id": 13047, "SQL": "select transaction_date from master_txn_table where customers = \"Joseph Rice\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 13048, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Elizabeth Rodriguez\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 13049, "SQL": "select sum(credit) from master_txn_table where product_service = \"Home care\" and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 13050, "SQL": "select product_service, 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 transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') group by product_service order by sum(credit) desc limit 1" }, { "id": 13051, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Nancy King\" ) " }, { "id": 13052, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 13053, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Leah Johnson\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') ) " }, { "id": 13054, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 13055, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Constructing bangalow\") and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 13056, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Sheila Black\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 13057, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brandon Sanders\" ) " }, { "id": 13058, "SQL": "select sum(credit) from master_txn_table where product_service = \"Navigational Instruments\" and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 13059, "SQL": "select max(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 = \"Brian Hopkins\" and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 13060, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Allen Fisher\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 13061, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 13062, "SQL": "select product_service, 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 transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') group by product_service order by sum(credit) desc limit 1" }, { "id": 13063, "SQL": "select transaction_date from master_txn_table where customers = \"Debbie Quinn\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 13064, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Christine Newman\"" }, { "id": 13065, "SQL": "select sum(credit) from master_txn_table where product_service = \"Brokerage\" and 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') " }, { "id": 13066, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Tony Salas\"" }, { "id": 13067, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Howard Dean\" ) " }, { "id": 13068, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Coal Power generation\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 13069, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 13070, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Helen Bullock\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 13071, "SQL": "select transaction_date 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 = \"Database management\" order by transaction_date asc limit 1 " }, { "id": 13072, "SQL": "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,\"Hotels and motel services\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 13073, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Christine Charles\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 13074, "SQL": "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,\"Youth guidance services\") 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') " }, { "id": 13075, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Fast food\" " }, { "id": 13076, "SQL": "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,\"Registration for tournaments and matches\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 13077, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Advertising\") and vendor = \"Cassandra Carr\"" }, { "id": 13078, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Amanda King\"" }, { "id": 13079, "SQL": "select sum(credit) from master_txn_table where product_service = \"Biomass electricity\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 13080, "SQL": "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,\"Amusement and recreation services\") and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 13081, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 13082, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and 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') " }, { "id": 13083, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Theresa Hamilton\" ) " }, { "id": 13084, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Margaret Hunt\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 13085, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 13086, "SQL": "select transaction_date from master_txn_table where customers = \"Stacie Benson\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 13087, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jonathan Frederick\" ) " }, { "id": 13088, "SQL": "select product_service, 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 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') group by product_service order by sum(credit) desc limit 1" }, { "id": 13089, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Shirley Hernandez\" order by transaction_date limit 1" }, { "id": 13090, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"License fees\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 13091, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Rebecca Roach\"" }, { "id": 13092, "SQL": "select transaction_date from master_txn_table where customers = \"Ashley Rivera\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 13093, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Robert Rodriguez MD\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 13094, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 13095, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Michael Hardy\"" }, { "id": 13096, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date) AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 13097, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Alec Doyle\"" }, { "id": 13098, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Melvin Mitchell\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') )" }, { "id": 13099, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Kenneth Larsen\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 13100, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 13101, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Baby furniture\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 13102, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 13103, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') and account_type in ('Expense','Other Expense') " }, { "id": 13104, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 13105, "SQL": "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,\"Street vending locations\") and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 13106, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') group by billing_city" }, { "id": 13107, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Andrew Vargas\"" }, { "id": 13108, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Gary Mccoy\"" }, { "id": 13109, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Jeanne Trujillo\"" }, { "id": 13110, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Paul Martin\" order by transaction_date limit 1" }, { "id": 13111, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Club \" " }, { "id": 13112, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Tina Ruiz\" ) " }, { "id": 13113, "SQL": "select product_service, 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 transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') group by product_service order by sum(credit) desc limit 1" }, { "id": 13114, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"George Smith\"" }, { "id": 13115, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Bookkeeper\") and vendor = \"Michael Anderson\"" }, { "id": 13116, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 13117, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 13118, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') group by billing_city" }, { "id": 13119, "SQL": "select sum(credit) from master_txn_table where product_service = \"Foster Care\" and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 13120, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 13121, "SQL": "select sum(credit) from master_txn_table where product_service = \"Nursing and health\" and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 13122, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Athletic uniforms\" " }, { "id": 13123, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Carolyn Fernandez\"" }, { "id": 13124, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 13125, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Nathan Garcia\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 13126, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 13127, "SQL": "select transaction_date from master_txn_table where customers = \"Tricia Thornton\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 13128, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Megan Jensen\" ) " }, { "id": 13129, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Chase Martin\" ) " }, { "id": 13130, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 13131, "SQL": "select min(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 = \"Anna Barrera\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 13132, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lisa Sanders\" ) " }, { "id": 13133, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 13134, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Melissa Caldwell\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 13135, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Deborah Craig\" ) " }, { "id": 13136, "SQL": "select transaction_date from master_txn_table where customers = \"Monica Allen\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 13137, "SQL": "select transaction_id from master_txn_table where customers = \"Toni Fernandez\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 13138, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Tyler Oneill\" ) " }, { "id": 13139, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Austin Bond\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date) AND date(current_date) )" }, { "id": 13140, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Business management\" " }, { "id": 13141, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Anne Perkins' or vendor = 'Anne Perkins'" }, { "id": 13142, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Eric Barnes\" ) " }, { "id": 13143, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Miranda Carey\" order by transaction_date limit 1" }, { "id": 13144, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ronnie Rice\" ) " }, { "id": 13145, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Matthew Martin\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 13146, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Tracey Rodriguez\" order by transaction_date limit 1" }, { "id": 13147, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 13148, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Savings\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 13149, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Michael Matthews\"" }, { "id": 13150, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Lawrence Lowe\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) )" }, { "id": 13151, "SQL": "select avg(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 = \"Joel Gonzalez\" and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 13152, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Mitchell Fox\" and transaction_type = 'invoice'" }, { "id": 13153, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 13154, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Leonard Davis\"" }, { "id": 13155, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Terri Bowman\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 13156, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Matthew Anderson\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 13157, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Brian Le\" order by transaction_date limit 1" }, { "id": 13158, "SQL": "select sum(credit) from master_txn_table where product_service = \"Dealing\" and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 13159, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Daniel Cruz\" ) " }, { "id": 13160, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Valerie Benson\" ) " }, { "id": 13161, "SQL": "select transaction_id from master_txn_table where customers = \"Brandon Oneal\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 13162, "SQL": "select sum(credit) from master_txn_table where product_service = \"Swimming pool Cleaning\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 13163, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Providing railroad switching services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 13164, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Renee Moody' or vendor = 'Renee Moody'" }, { "id": 13165, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 13166, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Barbara Jones\" ) " }, { "id": 13167, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Kelly Anderson\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") )" }, { "id": 13168, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Construction Projects\" " }, { "id": 13169, "SQL": "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,\"Reprographic services\") and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 13170, "SQL": "select min(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 = \"Kenneth Flores\" and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 13171, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Baby formula and food\") and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 13172, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 13173, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by billing_city" }, { "id": 13174, "SQL": "select sum(credit) from master_txn_table where product_service = \"Services\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 13175, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Providing trust and fiduciary services\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 13176, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Travis Spencer\" ) " }, { "id": 13177, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)group by product_service order by sum(credit) desc limit 1" }, { "id": 13178, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 13179, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 13180, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 13181, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Gina Jones\" order by transaction_date limit 1" }, { "id": 13182, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Steven Stewart\"" }, { "id": 13183, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brandon Peters\" ) " }, { "id": 13184, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 13185, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Carlos Warner\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) )" }, { "id": 13186, "SQL": "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,\"Computer software and software application training\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 13187, "SQL": "select transaction_date 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 = \"Dairy\" order by transaction_date asc limit 1 " }, { "id": 13188, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 13189, "SQL": "select transaction_date from master_txn_table where customers = \"Mackenzie Fernandez\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 13190, "SQL": "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,\"Surveying wells\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 13191, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Kenneth Chambers\"" }, { "id": 13192, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 13193, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Veronica Wang\"" }, { "id": 13194, "SQL": "select min(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 = \"Angela Phillips\" and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 13195, "SQL": "select transaction_date from master_txn_table where customers = \"Cheryl Garcia\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 13196, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Mikayla Hurst\"" }, { "id": 13197, "SQL": "select transaction_date from master_txn_table where customers = \"Steven Mcdonald\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 13198, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 13199, "SQL": "select min(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 = \"William Shah\" and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 13200, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 13201, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Kayla Boyd' or vendor = 'Kayla Boyd'" }, { "id": 13202, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 13203, "SQL": "select product_service, 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 transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') group by product_service order by sum(credit) desc limit 1" }, { "id": 13204, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Sarah Kemp\"" }, { "id": 13205, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Rachael Jackson\" order by transaction_date limit 1" }, { "id": 13206, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 13207, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Equipment Rental\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 13208, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') and account_type in ('Expense','Other Expense') " }, { "id": 13209, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 13210, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Terrence Walter\"" }, { "id": 13211, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 13212, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 13213, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Richard Vega\" order by transaction_date limit 1" }, { "id": 13214, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Michelle Marquez\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) )" }, { "id": 13215, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Alicia Rivera\"" }, { "id": 13216, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Vanessa Mcdonald\" ) " }, { "id": 13217, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Barbara Duran\" ) " }, { "id": 13218, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 13219, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Billy Poole\" ) " }, { "id": 13220, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Office Expenses\") and vendor = \"Sabrina Rodriguez\"" }, { "id": 13221, "SQL": "select transaction_id from master_txn_table where customers = \"Elizabeth Cook\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 13222, "SQL": "select transaction_id from master_txn_table where customers = \"Bruce Green\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 13223, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Janet Lane\" ) " }, { "id": 13224, "SQL": "select min(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 = \"Sean Brooks\" and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 13225, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Russell Combs\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 13226, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 13227, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"John Sanders\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) ) " }, { "id": 13228, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Lisa Bennett\"" }, { "id": 13229, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 13230, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Daniel Stewart\" ) " }, { "id": 13231, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Surveying wells\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 13232, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 13233, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"David Prince\"" }, { "id": 13234, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Amber Pittman\" ) " }, { "id": 13235, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Counseling\" " }, { "id": 13236, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Brett Ramirez\" and transaction_type = 'payment' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') )" }, { "id": 13237, "SQL": "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 loading and unloading services at rail terminals\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 13238, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 13239, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 13240, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Suzanne Gonzalez\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 13241, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Ian Thomas\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date) AND date(current_date) )" }, { "id": 13242, "SQL": "select transaction_date from master_txn_table where customers = \"Gloria Bradley\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 13243, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Brian Crawford\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") )" }, { "id": 13244, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Stephanie Conley\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") ) " }, { "id": 13245, "SQL": "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,\"Gifts and grants\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 13246, "SQL": "select transaction_date 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 = \"Lemon oil\" order by transaction_date asc limit 1 " }, { "id": 13247, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Tommy White\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 13248, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 13249, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Tina Carroll\" ) " }, { "id": 13250, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Kimberly Torres\"" }, { "id": 13251, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 13252, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 13253, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 13254, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Raymond Fischer\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 13255, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Julian Harris\" ) " }, { "id": 13256, "SQL": "select sum(credit) from master_txn_table where product_service = \"--\" and 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') " }, { "id": 13257, "SQL": "select transaction_date 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 = \"Oxygen\" order by transaction_date asc limit 1 " }, { "id": 13258, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Daniel Bush\" ) " }, { "id": 13259, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 13260, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Robin Esparza\" ) " }, { "id": 13261, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Jeffrey Willis' or vendor = 'Jeffrey Willis'" }, { "id": 13262, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Michael Barnes\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 13263, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Providing freight car cleaning services\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 13264, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Nursing and health\" " }, { "id": 13265, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 13266, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 13267, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Alexis Noble\" ) " }, { "id": 13268, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 13269, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Margaret Harvey\"" }, { "id": 13270, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Manufacturing citronella oil\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 13271, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Abigail Griffith\" ) " }, { "id": 13272, "SQL": "select min(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 = \"Katherine Gonzalez\" and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 13273, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Lynn Sharp\"" }, { "id": 13274, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 13275, "SQL": "select transaction_date from master_txn_table where customers = \"Angela Jensen\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 13276, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Allison Stewart\" ) " }, { "id": 13277, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Dwayne Hughes\" and transaction_type = 'invoice'" }, { "id": 13278, "SQL": "select sum(credit) from master_txn_table where product_service = \"Window washing\" and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 13279, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Patrick Houston' or vendor = 'Patrick Houston'" }, { "id": 13280, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Elizabeth Flores\" ) " }, { "id": 13281, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Donald James\" ) " }, { "id": 13282, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jennifer Grant\" ) " }, { "id": 13283, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jessica Ortiz\" ) " }, { "id": 13284, "SQL": "select transaction_date from master_txn_table where customers = \"Charles Webster\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 13285, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Melissa Taylor\" ) " }, { "id": 13286, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 13287, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 13288, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 13289, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 13290, "SQL": "select transaction_date from master_txn_table where customers = \"Stanley Christian DDS\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 13291, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date) AND date(current_date) group by billing_city" }, { "id": 13292, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Amanda Clark\"" }, { "id": 13293, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 13294, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jennifer Silva\" ) " }, { "id": 13295, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Nicole Morgan\" ) " }, { "id": 13296, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jennifer Taylor\" and transaction_type = 'invoice'" }, { "id": 13297, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Joshua Bell\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) ) " }, { "id": 13298, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Samuel Calhoun\" ) " }, { "id": 13299, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 13300, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Nonmetallic mineral ore exploration\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 13301, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Utilities\") and vendor = \"Michael Ferguson\"" }, { "id": 13302, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Surveying wells\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 13303, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 13304, "SQL": "select transaction_id from master_txn_table where product_service = \"Design\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 13305, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Cynthia Miller\" order by transaction_date limit 1" }, { "id": 13306, "SQL": "select sum(credit) from master_txn_table where product_service = \"Townhouses\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 13307, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Bradley Guerrero\" order by transaction_date limit 1" }, { "id": 13308, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 13309, "SQL": "select transaction_date 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 = \"Casings, Tubes and Rods\" order by transaction_date asc limit 1 " }, { "id": 13310, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Kendra Miller\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 13311, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 13312, "SQL": "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,\"Insurance\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 13313, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Jeffrey Smith' or vendor = 'Jeffrey Smith'" }, { "id": 13314, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Tara Kelly\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") ) " }, { "id": 13315, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 13316, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Jeremy Molina\"" }, { "id": 13317, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Raymond Sanchez\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 13318, "SQL": "select transaction_id from master_txn_table where customers = \"Adrian Crane\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 13319, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jeffery Mcdonald\" order by transaction_date limit 1" }, { "id": 13320, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 13321, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 13322, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Christine Alvarez\" ) " }, { "id": 13323, "SQL": "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,\"Telephone\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 13324, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Nicholas Chaney\" ) " }, { "id": 13325, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Robert Jimenez\" and transaction_type = 'invoice'" }, { "id": 13326, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 13327, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Colin Bradford\"" }, { "id": 13328, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Michael Jordan\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) ) " }, { "id": 13329, "SQL": "select transaction_date from master_txn_table where customers = \"Wendy Graham\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 13330, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Dale Ayers\" ) " }, { "id": 13331, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Barge rental or leasing\") and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 13332, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Rickey Kennedy\" ) " }, { "id": 13333, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Nicholas Frank\" ) " }, { "id": 13334, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 13335, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Christy Ramirez\" ) " }, { "id": 13336, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Erin Solis\" ) " }, { "id": 13337, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Monica Wagner\"" }, { "id": 13338, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"William King\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') )" }, { "id": 13339, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Rachel Sanders\" ) " }, { "id": 13340, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Patricia Mullins\" and transaction_type = 'payment' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') )" }, { "id": 13341, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Samantha Harris\"" }, { "id": 13342, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Brian Huff\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 13343, "SQL": "select transaction_date 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 = \"Non-nuclear\" order by transaction_date asc limit 1 " }, { "id": 13344, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Toni Cox\" ) " }, { "id": 13345, "SQL": "select transaction_id from master_txn_table where customers = \"Mary Harris\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 13346, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 13347, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Martin Thomas\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 13348, "SQL": "select transaction_date 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 = \"AI Courses\" order by transaction_date asc limit 1 " }, { "id": 13349, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Unapplied Cash Payment Income\") and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 13350, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 13351, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date) AND date(current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 13352, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Judith Stewart\" ) " }, { "id": 13353, "SQL": "select max(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 = \"Jeremy Thompson\" and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 13354, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ashley Barrett MD\" ) " }, { "id": 13355, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Maria Crawford\" ) " }, { "id": 13356, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Sean Brewer\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) )" }, { "id": 13357, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Amy Hicks' or vendor = 'Amy Hicks'" }, { "id": 13358, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 13359, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 13360, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 13361, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jennifer Herrera\" ) " }, { "id": 13362, "SQL": "select transaction_date 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 = \"Coffee and Snack\" order by transaction_date asc limit 1 " }, { "id": 13363, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 13364, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 13365, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Michael Brown\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 13366, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 13367, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 13368, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Baby apparel and shoes\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 13369, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 13370, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Abigail Li\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') )" }, { "id": 13371, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Tanker rental or leasing\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 13372, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Nicholas Williams\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 13373, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Mark Castro\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 13374, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Jessica Moore\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 13375, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Derek Sullivan\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 13376, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 13377, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Diapers\") and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 13378, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Matthew Walsh\" ) " }, { "id": 13379, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 13380, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 13381, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kenneth Williams\" ) " }, { "id": 13382, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 13383, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 13384, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Matthew Pacheco\"" }, { "id": 13385, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 13386, "SQL": "select sum(credit) from master_txn_table where product_service = \"Catering\" and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 13387, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Ventilation cleaning\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 13388, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Nancy Noble\" ) " }, { "id": 13389, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 13390, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Andrew Woods\" ) " }, { "id": 13391, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Stacy Johns\" ) " }, { "id": 13392, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Kevin Carroll\"" }, { "id": 13393, "SQL": "select transaction_date 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 = \"--\" order by transaction_date asc limit 1 " }, { "id": 13394, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Natalie Leach\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 13395, "SQL": "select sum(credit) from master_txn_table where product_service = \"Therapeutic\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 13396, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Ronald Mccoy MD\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 13397, "SQL": "select sum(credit) from master_txn_table where product_service = \"Document Copying\" and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 13398, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Travel\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 13399, "SQL": "select transaction_date from master_txn_table where customers = \"Jeremy Graves\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 13400, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 13401, "SQL": "select max(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 = \"Bruce Robinson\" and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 13402, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') order by sum(debit) desc limit 1" }, { "id": 13403, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Providing support services for financial\") and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 13404, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 13405, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Sheila Morrison' or vendor = 'Sheila Morrison'" }, { "id": 13406, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Dawn Hernandez\" ) " }, { "id": 13407, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Julie Lopez\" order by transaction_date limit 1" }, { "id": 13408, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Quality management assessment\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 13409, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Nancy Vang\"" }, { "id": 13410, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Patricia Hernandez\" and account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 13411, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Carbon dioxide manufacturing\") and 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') " }, { "id": 13412, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Erin Patel\" and transaction_type = 'invoice'" }, { "id": 13413, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 13414, "SQL": "select transaction_date from master_txn_table where customers = \"Denise Owen\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 13415, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 13416, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Patrick Mcguire\" ) " }, { "id": 13417, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Tiffany Stone' or vendor = 'Tiffany Stone'" }, { "id": 13418, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 13419, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Mary Ibarra\" ) " }, { "id": 13420, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Ray Casey\"" }, { "id": 13421, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 13422, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Monica Burke\" ) " }, { "id": 13423, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Brokerage\" " }, { "id": 13424, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Angela Mcguire\" order by transaction_date limit 1" }, { "id": 13425, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"James Conner\" ) " }, { "id": 13426, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lisa Anderson\" ) " }, { "id": 13427, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 13428, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Karen Mcmahon\"" }, { "id": 13429, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Sean Vega' or vendor = 'Sean Vega'" }, { "id": 13430, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Opera performances\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 13431, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Joshua Bishop\" and transaction_type = 'payment' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') ) " }, { "id": 13432, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Andrew Brown\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 13433, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Julia Morgan DDS\" ) " }, { "id": 13434, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Abandoned infant assistance\") and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 13435, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Valerie Coffey\" and transaction_type = 'invoice'" }, { "id": 13436, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Sherry Weaver' or vendor = 'Sherry Weaver'" }, { "id": 13437, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 13438, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Tanya Robinson\"" }, { "id": 13439, "SQL": "select transaction_date from master_txn_table where customers = \"Jeremy Rosario\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 13440, "SQL": "select transaction_date from master_txn_table where customers = \"Susan Delgado\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 13441, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 13442, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 13443, "SQL": "select min(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 = \"Veronica Cook\" and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 13444, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Joshua Mercer\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 13445, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 13446, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Robert Levy\" order by transaction_date limit 1" }, { "id": 13447, "SQL": "select transaction_id from master_txn_table where product_service = \"Apparel and shoes\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 13448, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Lauren Gonzalez\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date) AND date(current_date) ) " }, { "id": 13449, "SQL": "select sum(credit) from master_txn_table where product_service = \"Home Therapy\" and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 13450, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 13451, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') group by billing_city" }, { "id": 13452, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Peter Stevenson\" order by transaction_date limit 1" }, { "id": 13453, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Baby carriers\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 13454, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 13455, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Amanda Hunt\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) )" }, { "id": 13456, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Carlos Hester\" ) " }, { "id": 13457, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 13458, "SQL": "select sum(credit) from master_txn_table where product_service = \"Oxygen\" and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 13459, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Providing courses through business schools\") and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 13460, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Database management\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 13461, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Tara Henderson\" order by transaction_date limit 1" }, { "id": 13462, "SQL": "select transaction_id from master_txn_table where product_service = \"Providing other outdoor maintenance services\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 13463, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Allison Raymond\" and transaction_type = 'invoice'" }, { "id": 13464, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Traci Nguyen' or vendor = 'Traci Nguyen'" }, { "id": 13465, "SQL": "select transaction_date from master_txn_table where customers = \"Jessica Valdez\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 13466, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Natasha Lindsey' or vendor = 'Natasha Lindsey'" }, { "id": 13467, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 13468, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Crystal Joseph\" ) " }, { "id": 13469, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"PCs\" " }, { "id": 13470, "SQL": "select transaction_date from master_txn_table where customers = \"Francis Whitney\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 13471, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Nicholas Barron' or vendor = 'Nicholas Barron'" }, { "id": 13472, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 13473, "SQL": "select avg(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 = \"Hannah Robertson\" and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 13474, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Ceremony & reception venue\") and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 13475, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Pamela Davis\"" }, { "id": 13476, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Joseph Buckley\" ) " }, { "id": 13477, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 13478, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' 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') " }, { "id": 13479, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Karen Greene\"" }, { "id": 13480, "SQL": "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,\"Artificial Intelligence Courses\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 13481, "SQL": "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 other outdoor maintenance services\") and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 13482, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Deborah Miles\" and transaction_type = 'invoice'" }, { "id": 13483, "SQL": "select transaction_date from master_txn_table where customers = \"Terri Abbott\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 13484, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Coffee and snack shops\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 13485, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 13486, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Shannon James\" ) " }, { "id": 13487, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Musical performances\") and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 13488, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 13489, "SQL": "select transaction_id from master_txn_table where customers = \"Susan Wright\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 13490, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Manuel Cameron\" order by transaction_date limit 1" }, { "id": 13491, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 13492, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Lauren Harper\" order by transaction_date limit 1" }, { "id": 13493, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name 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 account_type in ('Expense','Other Expense') " }, { "id": 13494, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Dustin Goodman\" ) " }, { "id": 13495, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Advertising\") and vendor = \"Cassandra Carr\"" }, { "id": 13496, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 13497, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 13498, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Anthony Clark\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) )" }, { "id": 13499, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Stephanie Keller\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 13500, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sean Montoya\" ) " }, { "id": 13501, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ian Fry\" ) " }, { "id": 13502, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') order by sum(debit) desc limit 1" }, { "id": 13503, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Tanya Nguyen\" and transaction_type = 'invoice'" }, { "id": 13504, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Eric Greene\" ) " }, { "id": 13505, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Other nonfossil-fuel power generation\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 13506, "SQL": "select transaction_date 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 = \"Drain cleaning\" order by transaction_date asc limit 1 " }, { "id": 13507, "SQL": "select sum(credit) from master_txn_table where product_service = \"Heavy construction equipment\" and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 13508, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Jimmy Mack\" and transaction_type = 'payment' and 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') )" }, { "id": 13509, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') 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') group by billing_city" }, { "id": 13510, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Private parcel mailing services\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 13511, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Grant Klein\" order by transaction_date limit 1" }, { "id": 13512, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Attire and accessories\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 13513, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Julie Cook\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 13514, "SQL": "select transaction_date 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 = \"Motorbike\" order by transaction_date asc limit 1 " }, { "id": 13515, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 13516, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Amber Rodriguez\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 13517, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') order by sum(debit) desc limit 1" }, { "id": 13518, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 13519, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Crystal Richardson\" order by transaction_date limit 1" }, { "id": 13520, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 13521, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Stationery & Printing\") and vendor = \"Jeremiah Nguyen\"" }, { "id": 13522, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 13523, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jonathan Edwards\" ) " }, { "id": 13524, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Ceremony & reception venue\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 13525, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 13526, "SQL": "select transaction_id from master_txn_table where product_service = \"Youth community\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 13527, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 13528, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 13529, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Tara Pittman\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 13530, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Cheryl Gaines' or vendor = 'Cheryl Gaines'" }, { "id": 13531, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Amy Duffy\" ) " }, { "id": 13532, "SQL": "select sum(credit) from master_txn_table where product_service = \"Snow removal services\" and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 13533, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 13534, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Joseph Lopez\" ) " }, { "id": 13535, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Angela Booth\" ) " }, { "id": 13536, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 13537, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jessica Terrell\" order by transaction_date limit 1" }, { "id": 13538, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Traveller accomodation\" " }, { "id": 13539, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Courtney Morse\" ) " }, { "id": 13540, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kerri Smith\" ) " }, { "id": 13541, "SQL": "select transaction_id from master_txn_table where customers = \"Jonathan Garner\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 13542, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Manufacturing other Synthetic Oils\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 13543, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Nancy Perez\"" }, { "id": 13544, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Retailing home office furniture\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 13545, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Robert Hurst\"" }, { "id": 13546, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"William Waters\"" }, { "id": 13547, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Dana Santana\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) ) " }, { "id": 13548, "SQL": "select transaction_date from master_txn_table where customers = \"Steven Callahan\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 13549, "SQL": "select sum(credit) from master_txn_table where product_service = \"Wells\" and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 13550, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Reginald Moore\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 13551, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Angela White\" and transaction_type = 'invoice'" }, { "id": 13552, "SQL": "select transaction_date from master_txn_table where customers = \"Anna Carpenter\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 13553, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Whitney Gordon\"" }, { "id": 13554, "SQL": "select transaction_id from master_txn_table where product_service = \"Casings, Tubes and Rods\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 13555, "SQL": "select transaction_date 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 = \"Ceremony & reception venue\" order by transaction_date asc limit 1 " }, { "id": 13556, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 13557, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Stephanie Warner\" ) " }, { "id": 13558, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"James Hale\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') )" }, { "id": 13559, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Darren Jacobs\" and transaction_type = 'invoice'" }, { "id": 13560, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Megan Thompson\" order by transaction_date limit 1" }, { "id": 13561, "SQL": "select sum(credit) from master_txn_table where product_service = \"Golf Instructions\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 13562, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Stacy Hill\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 13563, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lynn Meza\" ) " }, { "id": 13564, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Shannon Sutton\" ) " }, { "id": 13565, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 13566, "SQL": "select transaction_date from master_txn_table where customers = \"Laura Peterson\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 13567, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') order by sum(debit) desc limit 1" }, { "id": 13568, "SQL": "select transaction_date from master_txn_table where customers = \"Jason Olsen\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 13569, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Rachel Beck\" ) " }, { "id": 13570, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Commissions & fees\") and vendor = \"Scott Garza\"" }, { "id": 13571, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Michael Ashley\" ) " }, { "id": 13572, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Other Income\") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 13573, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Carlos Allen\" order by transaction_date limit 1" }, { "id": 13574, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Natalie Munoz' or vendor = 'Natalie Munoz'" }, { "id": 13575, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Christopher Tran\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 13576, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Hannah Davis\"" }, { "id": 13577, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Janet Richardson' or vendor = 'Janet Richardson'" }, { "id": 13578, "SQL": "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,\"Medication dispensing\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 13579, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Other construction activities\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 13580, "SQL": "select transaction_date 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 = \"Tournaments and Matches\" order by transaction_date asc limit 1 " }, { "id": 13581, "SQL": "select transaction_id from master_txn_table where product_service = \"Equity Market Neutral\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 13582, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Insurance\") and vendor = \"Matthew Serrano\"" }, { "id": 13583, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 13584, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Richard Roach\" ) " }, { "id": 13585, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Erica Roy\" ) " }, { "id": 13586, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Angela Cannon\" order by transaction_date limit 1" }, { "id": 13587, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 13588, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 13589, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 13590, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jay Zimmerman\" ) " }, { "id": 13591, "SQL": "select transaction_id from master_txn_table where product_service = \"Care-planning\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 13592, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 13593, "SQL": "select transaction_date from master_txn_table where customers = \"Brittany Myers\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 13594, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 13595, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 13596, "SQL": "select transaction_id from master_txn_table where product_service = \"Livestock\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 13597, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 13598, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 13599, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 13600, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 13601, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 13602, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 13603, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") and account_type in ('Expense','Other Expense') " }, { "id": 13604, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Gary Martin\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 13605, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Robert Villanueva\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 13606, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Kelli Berry\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 13607, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 13608, "SQL": "select avg(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 = \"Andrew Richards\" and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 13609, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 13610, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jennifer Montgomery MD\" ) " }, { "id": 13611, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Caitlyn Lewis\" ) " }, { "id": 13612, "SQL": "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,\"Refunds-Allowances\") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 13613, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jesus Beck MD\" ) " }, { "id": 13614, "SQL": "select transaction_date 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 = \"Bowling\" order by transaction_date asc limit 1 " }, { "id": 13615, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounting\") and vendor = \"Ethan Vasquez\"" }, { "id": 13616, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Pamela Wagner\"" }, { "id": 13617, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"John Meadows\" ) " }, { "id": 13618, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 13619, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Samantha Cervantes\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') ) " }, { "id": 13620, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Julie Sexton\" ) " }, { "id": 13621, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 13622, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 13623, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 13624, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') order by sum(debit) desc limit 1" }, { "id": 13625, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 13626, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 13627, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Michael Golden\" ) " }, { "id": 13628, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') order by sum(debit) desc limit 1" }, { "id": 13629, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and 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') group by billing_city" }, { "id": 13630, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 13631, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brandon Lynch\" ) " }, { "id": 13632, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Robert Parks\" and transaction_type = 'invoice'" }, { "id": 13633, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Elizabeth Neal\"" }, { "id": 13634, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Matthew Vega\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) )" }, { "id": 13635, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 13636, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Alan Gray' or vendor = 'Alan Gray'" }, { "id": 13637, "SQL": "select sum(credit) from master_txn_table where product_service = \"Clothing and footwear\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 13638, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Justin Mendoza\"" }, { "id": 13639, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 13640, "SQL": "select sum(credit) from master_txn_table where product_service = \"high-rise and low-rise buildings\" and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 13641, "SQL": "select avg(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 = \"Susan Price\" and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 13642, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 13643, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Christopher Fernandez\" ) " }, { "id": 13644, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') and account_type in ('Expense','Other Expense') " }, { "id": 13645, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 13646, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 13647, "SQL": "select transaction_id from master_txn_table where product_service = \"Hydrogen\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 13648, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Application service provisioning\") and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 13649, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 13650, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brandon Blair\" ) " }, { "id": 13651, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Allison Snyder' or vendor = 'Allison Snyder'" }, { "id": 13652, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kimberly Wilkinson\" ) " }, { "id": 13653, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Alicia Aguilar\"" }, { "id": 13654, "SQL": "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,\"Development of software products for PCs\") and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 13655, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Diane Palmer' or vendor = 'Diane Palmer'" }, { "id": 13656, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Aaron Conrad\" ) " }, { "id": 13657, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Heather Berg\" order by transaction_date limit 1" }, { "id": 13658, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 13659, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Christine Martinez\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 13660, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 13661, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 13662, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kellie Krause\" ) " }, { "id": 13663, "SQL": "select transaction_date from master_txn_table where customers = \"Anthony Jordan\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 13664, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Thomas Aguilar\" ) " }, { "id": 13665, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Aaron Tran\"" }, { "id": 13666, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Miguel Lopez\" order by transaction_date limit 1" }, { "id": 13667, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 13668, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Gifts and grants\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 13669, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 13670, "SQL": "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 = \"Jacob Smith\" and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 13671, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Debra Matthews\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 13672, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 13673, "SQL": "select transaction_date 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 = \"Dietary and Nutritional\" order by transaction_date asc limit 1 " }, { "id": 13674, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Marissa Collier\" ) " }, { "id": 13675, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Railroad Cars\" " }, { "id": 13676, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') group by billing_city" }, { "id": 13677, "SQL": "select transaction_id from master_txn_table where customers = \"Holly Orr\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 13678, "SQL": "select transaction_date 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 = \"Invitations\" order by transaction_date asc limit 1 " }, { "id": 13679, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Joshua Austin\" ) " }, { "id": 13680, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 13681, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by billing_city" }, { "id": 13682, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 13683, "SQL": "select transaction_date from master_txn_table where customers = \"Stephanie Mckee\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 13684, "SQL": "select transaction_date 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 = \"Child abuse prevention\" order by transaction_date asc limit 1 " }, { "id": 13685, "SQL": "select product_service, 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 transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') group by product_service order by sum(credit) desc limit 1" }, { "id": 13686, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brenda Cobb\" ) " }, { "id": 13687, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Barry Atkins\" ) " }, { "id": 13688, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Samantha Brown\" order by transaction_date limit 1" }, { "id": 13689, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Wardrobe\" " }, { "id": 13690, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Katherine Cox MD\" order by transaction_date limit 1" }, { "id": 13691, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 13692, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 13693, "SQL": "select transaction_date 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 = \"Carriers\" order by transaction_date asc limit 1 " }, { "id": 13694, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 13695, "SQL": "select transaction_id from master_txn_table where product_service = \"Brokerage\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 13696, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Julie Hall DVM\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 13697, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Christina Dodson' or vendor = 'Christina Dodson'" }, { "id": 13698, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Roy Cooper\" ) " }, { "id": 13699, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Patricia Klein\" order by transaction_date limit 1" }, { "id": 13700, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 13701, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Brittney Ferguson\" order by transaction_date limit 1" }, { "id": 13702, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 13703, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Intravenous Therapy\" " }, { "id": 13704, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 13705, "SQL": "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 engines and parts\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 13706, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 13707, "SQL": "select transaction_date from master_txn_table where customers = \"Haley Garcia\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 13708, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 13709, "SQL": "select min(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 = \"Donna Fischer\" and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 13710, "SQL": "select sum(credit) from master_txn_table where product_service = \"Golf Instructions\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 13711, "SQL": "select transaction_date 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 = \"Clothing and footwear\" order by transaction_date asc limit 1 " }, { "id": 13712, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"James Lang\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 13713, "SQL": "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,\"Copy centers\") and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 13714, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Manufacturing lemon oil\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 13715, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 13716, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 13717, "SQL": "select transaction_date from master_txn_table where customers = \"Jordan Ortiz\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 13718, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by billing_city" }, { "id": 13719, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Tyler Wallace\" ) " }, { "id": 13720, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 13721, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Adam Pena\" ) " }, { "id": 13722, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 13723, "SQL": "select transaction_date 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 = \"Toys\" order by transaction_date asc limit 1 " }, { "id": 13724, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Hunter Chavez\"" }, { "id": 13725, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 13726, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 13727, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 13728, "SQL": "select transaction_id from master_txn_table where customers = \"Joel Davis\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 13729, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") order by sum(debit) desc limit 1" }, { "id": 13730, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') group by billing_city" }, { "id": 13731, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Tammy Stewart\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 13732, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Robert Boyer\" order by transaction_date limit 1" }, { "id": 13733, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 13734, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Louis Garcia\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 13735, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 13736, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and 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') " }, { "id": 13737, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Meals and Entertainment\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 13738, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jamie Stone\" order by transaction_date limit 1" }, { "id": 13739, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Baby strollers\") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 13740, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Daniel Huynh\" order by transaction_date limit 1" }, { "id": 13741, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kimberly Bell\" ) " }, { "id": 13742, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Julie Cannon\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 13743, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Alexis Cannon\" ) " }, { "id": 13744, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 13745, "SQL": "select transaction_id from master_txn_table where customers = \"Teresa Goodwin\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 13746, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Chloe Hernandez DVM\" ) " }, { "id": 13747, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Matthew Johnson\" and transaction_type = 'payment' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') ) " }, { "id": 13748, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 13749, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 13750, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Ceremony & reception venue\") and 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') " }, { "id": 13751, "SQL": "select transaction_date from master_txn_table where customers = \"Mckenzie Evans\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 13752, "SQL": "select max(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 = \"Matthew Boone\" and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 13753, "SQL": "select transaction_date from master_txn_table where customers = \"Linda Jones\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 13754, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') group by product_service order by sum(credit) desc limit 1" }, { "id": 13755, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Providing classes in stenography and court reporting\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 13756, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Brianna Wilkins\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 13757, "SQL": "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,\"Constructing multifamily residential\") and 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') " }, { "id": 13758, "SQL": "select transaction_date from master_txn_table where customers = \"Sue Lewis\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 13759, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 13760, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brenda Cabrera\" ) " }, { "id": 13761, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jack Gray\" and transaction_type = 'invoice'" }, { "id": 13762, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Christian Fernandez\"" }, { "id": 13763, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Alice Rodriguez\" ) " }, { "id": 13764, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 13765, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 13766, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Larry Perez\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) ) " }, { "id": 13767, "SQL": "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 processing computer services\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 13768, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Jessica Todd' or vendor = 'Jessica Todd'" }, { "id": 13769, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Bookkeeper\") and vendor = \"Michael Bird\"" }, { "id": 13770, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 13771, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Michael Lopez DVM\"" }, { "id": 13772, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 13773, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Nicholas Wolfe\"" }, { "id": 13774, "SQL": "select transaction_date from master_txn_table where customers = \"Jamie Ibarra\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 13775, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jeffrey Crawford\" ) " }, { "id": 13776, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) group by billing_city" }, { "id": 13777, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') group by billing_city" }, { "id": 13778, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 13779, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') group by product_service order by sum(credit) desc limit 1" }, { "id": 13780, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Samantha Hughes\" order by transaction_date limit 1" }, { "id": 13781, "SQL": "select transaction_id from master_txn_table where customers = \"Joan Holmes\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 13782, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Brett Peterson\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 13783, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 13784, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Michael Pittman\"" }, { "id": 13785, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Michael Mckee\" ) " }, { "id": 13786, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Amanda Jacobs\" ) " }, { "id": 13787, "SQL": "select transaction_id from master_txn_table where customers = \"Angela Patel DDS\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 13788, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Supplies\") and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 13789, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Coal Pwer\" " }, { "id": 13790, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 13791, "SQL": "select transaction_date 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 = \"Memberships\" order by transaction_date asc limit 1 " }, { "id": 13792, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 13793, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Christopher Calhoun\"" }, { "id": 13794, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Gina Watts\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 13795, "SQL": "select transaction_id from master_txn_table where product_service = \"Townhouses\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 13796, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Justin Mejia\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 13797, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Spraying services\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 13798, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Recognition software for IT and telecommunications\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 13799, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Tracy Morris\" and transaction_type = 'invoice'" }, { "id": 13800, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Insurance\") and vendor = \"Bonnie Johnson\"" }, { "id": 13801, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jeremy Howard\" ) " }, { "id": 13802, "SQL": "select sum(credit) from master_txn_table where product_service = \"Business courses\" and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 13803, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Emily Singleton\" order by transaction_date limit 1" }, { "id": 13804, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date) AND date(current_date) group by billing_city" }, { "id": 13805, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 13806, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 13807, "SQL": "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,\"Fluorocarbon gases manufacturing\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 13808, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Susan Cunningham\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 13809, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Home therapy services\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 13810, "SQL": "select max(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 = \"Charles Moyer\" and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 13811, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 13812, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Travis Porter\" ) " }, { "id": 13813, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Offering equity market neutral funds\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 13814, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') order by sum(debit) desc limit 1" }, { "id": 13815, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 13816, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Joseph Palmer\" and transaction_type = 'invoice'" }, { "id": 13817, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Gary Stone\" ) " }, { "id": 13818, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 13819, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Eddie Hendricks\"" }, { "id": 13820, "SQL": "select transaction_id from master_txn_table where product_service = \"Brokerage\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 13821, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 13822, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Joshua Massey\" order by transaction_date limit 1" }, { "id": 13823, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 13824, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Marc Price\"" }, { "id": 13825, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Douglas Nelson\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 13826, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Stacy Hoffman\" and account_type in ('Expense','Other Expense') 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') " }, { "id": 13827, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Jill Stout\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 13828, "SQL": "select transaction_id from master_txn_table where customers = \"Christine Steele\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 13829, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 13830, "SQL": "select transaction_id from master_txn_table where product_service = \"Care-planning\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 13831, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Thomas Ortiz\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) )" }, { "id": 13832, "SQL": "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,\"Non-musical performances\") and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 13833, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Patricia Taylor\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 13834, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Ryan Morrow\" order by transaction_date limit 1" }, { "id": 13835, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Mary Brewer\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') )" }, { "id": 13836, "SQL": "select transaction_date 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 = \"Biomass electricity\" order by transaction_date asc limit 1 " }, { "id": 13837, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and 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') " }, { "id": 13838, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 13839, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Elizabeth Larsen\"" }, { "id": 13840, "SQL": "select transaction_id from master_txn_table where product_service = \"Hydrogen\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 13841, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by billing_city" }, { "id": 13842, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 13843, "SQL": "select transaction_date from master_txn_table where customers = \"Miss Lauren Clark\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 13844, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 13845, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Bryan Ferguson\" order by transaction_date limit 1" }, { "id": 13846, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 13847, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"David Gardner\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") ) " }, { "id": 13848, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 13849, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Edward Cain\" ) " }, { "id": 13850, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Joseph Green\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) ) " }, { "id": 13851, "SQL": "select min(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 = \"Dustin Bennett\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 13852, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Musicians\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 13853, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Darlene Cook\" ) " }, { "id": 13854, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Tyler Ward\" ) " }, { "id": 13855, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 13856, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Benjamin Rodriguez\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 13857, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"William Waters\" and account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 13858, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Francisco Rose DDS\"" }, { "id": 13859, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Brian Woods\" order by transaction_date limit 1" }, { "id": 13860, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"John Price\" order by transaction_date limit 1" }, { "id": 13861, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Geothermal-fueled power generation\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 13862, "SQL": "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,\"Care-planning services\") 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') " }, { "id": 13863, "SQL": "select product_service, 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 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') group by product_service order by sum(credit) desc limit 1" }, { "id": 13864, "SQL": "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,\"Constructing apartment complexes\") and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 13865, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Barbara Myers\" order by transaction_date limit 1" }, { "id": 13866, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 13867, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Steve Morris\" ) " }, { "id": 13868, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Tyler Booth\" ) " }, { "id": 13869, "SQL": "select sum(credit) from master_txn_table where product_service = \"Boat\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 13870, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 13871, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 13872, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Gabrielle May\" and transaction_type = 'invoice'" }, { "id": 13873, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Manufacturing other essential oils\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 13874, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Juan Gutierrez\" ) " }, { "id": 13875, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 13876, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Carlos Andrews\"" }, { "id": 13877, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Sara Fisher' or vendor = 'Sara Fisher'" }, { "id": 13878, "SQL": "select avg(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 = \"Troy Sanchez\" and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 13879, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 13880, "SQL": "select max(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 = \"Marie Walker\" and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 13881, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Wholesaling navigational instruments (except electronic)\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 13882, "SQL": "select transaction_id from master_txn_table where customers = \"Jason Santana\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 13883, "SQL": "select max(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 = \"Robert Ware\" and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 13884, "SQL": "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,\"Youth guidance services\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 13885, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Joshua Cook\" ) " }, { "id": 13886, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 13887, "SQL": "select avg(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 = \"Christina Little\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 13888, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Kyle Richardson\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) ) " }, { "id": 13889, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jonathan Bartlett\" ) " }, { "id": 13890, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 13891, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Thomas Cobb\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date) AND date(current_date) )" }, { "id": 13892, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 13893, "SQL": "select transaction_date from master_txn_table where customers = \"Nicole Huff MD\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 13894, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Noah Higgins' or vendor = 'Noah Higgins'" }, { "id": 13895, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Michele Rodriguez\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) ) " }, { "id": 13896, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 13897, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 13898, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Andrea Gonzalez\"" }, { "id": 13899, "SQL": "select sum(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Miscellaneous\" " }, { "id": 13900, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') group by billing_city" }, { "id": 13901, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Megan Patton\" order by transaction_date limit 1" }, { "id": 13902, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') 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') order by sum(debit) desc limit 1" }, { "id": 13903, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Ricky Barber' or vendor = 'Ricky Barber'" }, { "id": 13904, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Tracy Sawyer\" ) " }, { "id": 13905, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 13906, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Robert Joseph\" ) " }, { "id": 13907, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 13908, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Samantha Lewis\" ) " }, { "id": 13909, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 13910, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Regina Knight\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') )" }, { "id": 13911, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 13912, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kimberly Wagner\" ) " }, { "id": 13913, "SQL": "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,\"Bookkeeper\") and 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') " }, { "id": 13914, "SQL": "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 support services for financial\") and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 13915, "SQL": "select transaction_id from master_txn_table where customers = \"Samuel Wu\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 13916, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Yolanda Simmons\"" }, { "id": 13917, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Philip Ellis\"" }, { "id": 13918, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Manufacturing other Synthetic Oils\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 13919, "SQL": "select transaction_date from master_txn_table where customers = \"Alan Hayes\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 13920, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Scott Estes\" ) " }, { "id": 13921, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") group by product_service order by sum(credit) desc limit 1" }, { "id": 13922, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Lindsay Gibson' or vendor = 'Lindsay Gibson'" }, { "id": 13923, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 13924, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Industrial manufacturing\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 13925, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 13926, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Anthony Rivera\"" }, { "id": 13927, "SQL": "select transaction_id from master_txn_table where product_service = \"Aeronautical Equipment\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 13928, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 13929, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 13930, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Design and management services \") and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 13931, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Rachel Franklin\"" }, { "id": 13932, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Denise Cooper\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) )" }, { "id": 13933, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 13934, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 13935, "SQL": "select transaction_date from master_txn_table where customers = \"William Harris\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 13936, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 13937, "SQL": "select transaction_id from master_txn_table where product_service = \"Equity long bias\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 13938, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Kristie Carter\"" }, { "id": 13939, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Katherine Hardy\"" }, { "id": 13940, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 13941, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Tammy Graham PhD\" ) " }, { "id": 13942, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 13943, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 13944, "SQL": "select sum(credit) from master_txn_table where product_service = \"Counseling\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 13945, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Mitchell Mckee' or vendor = 'Mitchell Mckee'" }, { "id": 13946, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Samantha Gardner\" and account_type in ('Expense','Other Expense') and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 13947, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date) AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 13948, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Carol Stokes' or vendor = 'Carol Stokes'" }, { "id": 13949, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 13950, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Katie Bowman\" order by transaction_date limit 1" }, { "id": 13951, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Shawn Duncan\" order by transaction_date limit 1" }, { "id": 13952, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Sheila Phillips' or vendor = 'Sheila Phillips'" }, { "id": 13953, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 13954, "SQL": "select transaction_date 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 field Machinery\" order by transaction_date asc limit 1 " }, { "id": 13955, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Amy Boyle\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') ) " }, { "id": 13956, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Nicole Rivera MD\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 13957, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Angela Hess\"" }, { "id": 13958, "SQL": "select transaction_date 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 = \"Townhouses\" order by transaction_date asc limit 1 " }, { "id": 13959, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Transportation\") and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 13960, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 13961, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 13962, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 13963, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Matthew Solis\" ) " }, { "id": 13964, "SQL": "select transaction_date 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 = \"Waste-fueled\" order by transaction_date asc limit 1 " }, { "id": 13965, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Charles Cunningham\" ) " }, { "id": 13966, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Justin Mendoza\"" }, { "id": 13967, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"William Mays\" and transaction_type = 'invoice'" }, { "id": 13968, "SQL": "select transaction_date from master_txn_table where customers = \"Kevin Diaz\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 13969, "SQL": "select sum(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Non-renewable\" " }, { "id": 13970, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Douglas Gomez\" ) " }, { "id": 13971, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Disposal Fees\") and vendor = \"Judith Cox\"" }, { "id": 13972, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jeffery Ingram\" ) " }, { "id": 13973, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' 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') " }, { "id": 13974, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Rachel Clark\" ) " }, { "id": 13975, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Nicholas Pope\"" }, { "id": 13976, "SQL": "select transaction_id from master_txn_table where product_service = \"Bedding\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 13977, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 13978, "SQL": "select min(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 = \"Robert Stafford\" and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 13979, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Alexander Greene\" ) " }, { "id": 13980, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Warren Scott\" and transaction_type = 'invoice'" }, { "id": 13981, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 13982, "SQL": "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,\"Discounts given\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 13983, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 13984, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 13985, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Shawn Rodriguez\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) ) " }, { "id": 13986, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Debbie Weiss\" ) " }, { "id": 13987, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Brent Hall' or vendor = 'Brent Hall'" }, { "id": 13988, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brian Garza\" ) " }, { "id": 13989, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Julie Bishop\" ) " }, { "id": 13990, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Robert Jackson\" ) " }, { "id": 13991, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Aaron Wang\" ) " }, { "id": 13992, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 13993, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Charles Lindsey\" order by transaction_date limit 1" }, { "id": 13994, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 13995, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Greg Ellison\" order by transaction_date limit 1" }, { "id": 13996, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lori Butler\" ) " }, { "id": 13997, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Cost of Labor\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 13998, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"James Walters\" ) " }, { "id": 13999, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Carla Phillips\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) ) " }, { "id": 14000, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sharon Mathews\" ) " }, { "id": 14001, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Amy Mcclure\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) )" }, { "id": 14002, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Tracey Yates\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 14003, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') group by billing_city" }, { "id": 14004, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Alan Ponce\" ) " }, { "id": 14005, "SQL": "select avg(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 = \"Paul Parker\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 14006, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Brandon Anderson\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 14007, "SQL": "select transaction_id from master_txn_table where customers = \"Holly Whitaker\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 14008, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Mary Flores\" ) " }, { "id": 14009, "SQL": "select transaction_date 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 = \"Marine Supplies\" order by transaction_date asc limit 1 " }, { "id": 14010, "SQL": "select sum(credit) from master_txn_table where product_service = \"Sofas/sofa-sleepers\" and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 14011, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') group by billing_city" }, { "id": 14012, "SQL": "select sum(credit) from master_txn_table where product_service = \"Ceremony & reception venue\" and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 14013, "SQL": "select transaction_date from master_txn_table where customers = \"Erik Brooks\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 14014, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Vanessa Davis\" ) " }, { "id": 14015, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 14016, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Kendra Miller\"" }, { "id": 14017, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Wesley Gonzales\" order by transaction_date limit 1" }, { "id": 14018, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kenneth Taylor\" ) " }, { "id": 14019, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Metal ore exploration\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 14020, "SQL": "select transaction_date 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 = \"Industrial manufacturing\" order by transaction_date asc limit 1 " }, { "id": 14021, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 14022, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Tyler Mcdonald\" ) " }, { "id": 14023, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Wholesaling aircraft\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 14024, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 14025, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Kristi Bond\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') )" }, { "id": 14026, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by billing_city" }, { "id": 14027, "SQL": "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,\"Local area network management training\") and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 14028, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) group by billing_city" }, { "id": 14029, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Chairs\" " }, { "id": 14030, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 14031, "SQL": "select transaction_id from master_txn_table where product_service = \"Transportation\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 14032, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 14033, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 14034, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') group by billing_city" }, { "id": 14035, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 14036, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 14037, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 14038, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Brendan Kennedy\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 14039, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jennifer Li\" ) " }, { "id": 14040, "SQL": "select transaction_date from master_txn_table where customers = \"Brandon Gallegos\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 14041, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Job Expenses\") and vendor = \"Christopher Harmon\"" }, { "id": 14042, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 14043, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 14044, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Jason Castaneda\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) )" }, { "id": 14045, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Roy Davis\"" }, { "id": 14046, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 14047, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Adoption placement services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 14048, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 14049, "SQL": "select transaction_id from master_txn_table where customers = \"Robin Torres\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 14050, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Linda Morgan\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 14051, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 14052, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Dylan Aguirre\" ) " }, { "id": 14053, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Christian Hughes\" ) " }, { "id": 14054, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Andrea Ellis\" ) " }, { "id": 14055, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 14056, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 14057, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") order by sum(debit) desc limit 1" }, { "id": 14058, "SQL": "select max(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 = \"Scott Rose\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 14059, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') group by billing_city" }, { "id": 14060, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Laura Montes\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 14061, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ian Harper\" ) " }, { "id": 14062, "SQL": "select transaction_id from master_txn_table where customers = \"Marissa Carter\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 14063, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 14064, "SQL": "select min(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 = \"William Becker\" and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 14065, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Brenda Garcia\"" }, { "id": 14066, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Danny Perry\" order by transaction_date limit 1" }, { "id": 14067, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Christopher Tran\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 14068, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Carolyn Sanders\" order by transaction_date limit 1" }, { "id": 14069, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Jamie Cooper\"" }, { "id": 14070, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kim Chambers\" ) " }, { "id": 14071, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Penny Beasley\" ) " }, { "id": 14072, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 14073, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 14074, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 14075, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Brittany Sawyer\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 14076, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 14077, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Quality accreditation\" " }, { "id": 14078, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 14079, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 14080, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Shirley Lopez\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') )" }, { "id": 14081, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Bank Charges\") and vendor = \"Vickie Hancock\"" }, { "id": 14082, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Copy centers\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 14083, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Rachael Taylor\"" }, { "id": 14084, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Sherry Anderson\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 14085, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 14086, "SQL": "select min(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 = \"Lauren Montgomery\" and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 14087, "SQL": "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,\"Self-help programs for teens\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 14088, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Gabriel Potter\" ) " }, { "id": 14089, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Jessica Moore\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 14090, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Christopher Richardson\" order by transaction_date limit 1" }, { "id": 14091, "SQL": "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,\"Offering equity long-only\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 14092, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Michael Taylor\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") )" }, { "id": 14093, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Grant Sullivan\" ) " }, { "id": 14094, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Natalie Fisher' or vendor = 'Natalie Fisher'" }, { "id": 14095, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Thomas Chambers\" ) " }, { "id": 14096, "SQL": "select transaction_id from master_txn_table where product_service = \"Food & drink\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 14097, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by billing_city" }, { "id": 14098, "SQL": "select max(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 = \"Erin Singh\" and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 14099, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Angela Davis\"" }, { "id": 14100, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Frank Black\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 14101, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 14102, "SQL": "select sum(credit) from master_txn_table where product_service = \"Data storage management\" and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 14103, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Mary Curtis\"" }, { "id": 14104, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 14105, "SQL": "select transaction_date from master_txn_table where customers = \"Megan Williams MD\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 14106, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Nicholas Reyes\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') )" }, { "id": 14107, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Rebecca King MD\" ) " }, { "id": 14108, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"David White\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 14109, "SQL": "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,\"Offering equity long/short \") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 14110, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Building Repairs\") and vendor = \"Robert Gibbs\"" }, { "id": 14111, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) group by billing_city" }, { "id": 14112, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Melinda Griffith DDS\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) ) " }, { "id": 14113, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 14114, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Savings\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 14115, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 14116, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Patricia Lewis\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 14117, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Paul Neal\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") )" }, { "id": 14118, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Angela Mckinney' or vendor = 'Angela Mckinney'" }, { "id": 14119, "SQL": "select transaction_id from master_txn_table where product_service = \"Social activities\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 14120, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 14121, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jamie King\" ) " }, { "id": 14122, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Carrie Chen\" ) " }, { "id": 14123, "SQL": "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,\"Musicians\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 14124, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 14125, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Appearances and speeches\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 14126, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Megan Gonzales\" ) " }, { "id": 14127, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jennifer Morris\" ) " }, { "id": 14128, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Geothermal\" " }, { "id": 14129, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Keith Martin\" ) " }, { "id": 14130, "SQL": "select transaction_date 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 = \"License fees\" order by transaction_date asc limit 1 " }, { "id": 14131, "SQL": "select transaction_date from master_txn_table where customers = \"Brenda Peterson\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 14132, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 14133, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 14134, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 14135, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 14136, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 14137, "SQL": "select transaction_date from master_txn_table where customers = \"Sherry Juarez\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 14138, "SQL": "select transaction_date from master_txn_table where customers = \"Tony Townsend\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 14139, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and 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') " }, { "id": 14140, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Dalton Hendrix\" order by transaction_date limit 1" }, { "id": 14141, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 14142, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"James Rowe\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 14143, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Judith Smith\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date) AND date(current_date) ) " }, { "id": 14144, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brooke Kaufman\" ) " }, { "id": 14145, "SQL": "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,\"Social activities\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 14146, "SQL": "select transaction_date 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 = \"Data processing\" order by transaction_date asc limit 1 " }, { "id": 14147, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Jennifer Howard\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 14148, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Howard Allen\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) ) " }, { "id": 14149, "SQL": "select transaction_date 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 = \"Well casings\" order by transaction_date asc limit 1 " }, { "id": 14150, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Michelle Lane\" ) " }, { "id": 14151, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 14152, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 14153, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Julie Cook\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 14154, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Jennifer Richard\"" }, { "id": 14155, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Steven Roberson' or vendor = 'Steven Roberson'" }, { "id": 14156, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Paula Wade\" order by transaction_date limit 1" }, { "id": 14157, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 14158, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") order by sum(debit) desc limit 1" }, { "id": 14159, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Jeffrey Grant\" and transaction_type = 'payment' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') )" }, { "id": 14160, "SQL": "select transaction_date from master_txn_table where customers = \"Justin Mendoza\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 14161, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Manufacturing spearmint oil\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 14162, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Robert Hodges\"" }, { "id": 14163, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 14164, "SQL": "select transaction_date from master_txn_table where customers = \"Justin Romero\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 14165, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Regina Christian\"" }, { "id": 14166, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Patrick Hall\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 14167, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jason Whitney\" order by transaction_date limit 1" }, { "id": 14168, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Patricia Brown' or vendor = 'Patricia Brown'" }, { "id": 14169, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Mary Stone\"" }, { "id": 14170, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Kevin Sellers\"" }, { "id": 14171, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Dues & Subscriptions\") and vendor = \"Ashlee Hoffman\"" }, { "id": 14172, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') group by billing_city" }, { "id": 14173, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Michelle Jensen\" ) " }, { "id": 14174, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Amanda Johnston\" ) " }, { "id": 14175, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 14176, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Clayton Wood\" ) " }, { "id": 14177, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Albert Guerrero\" ) " }, { "id": 14178, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 14179, "SQL": "select transaction_date 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 = \"Youth community\" order by transaction_date asc limit 1 " }, { "id": 14180, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Justin Holmes\" order by transaction_date limit 1" }, { "id": 14181, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kevin Duncan\" ) " }, { "id": 14182, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 14183, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lauren Tate\" ) " }, { "id": 14184, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Megan Mitchell\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) ) " }, { "id": 14185, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Recognition software for healthcare\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 14186, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Offering distressed securities funds\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 14187, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Yvette Martin\" ) " }, { "id": 14188, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Fishing supply retailing\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 14189, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Christina Montoya\" ) " }, { "id": 14190, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Terry Sandoval\" order by transaction_date limit 1" }, { "id": 14191, "SQL": "select transaction_id from master_txn_table where customers = \"Maria Miller\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 14192, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 14193, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 14194, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Supplies\") and vendor = \"Jonathan Russo\"" }, { "id": 14195, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 14196, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 14197, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 14198, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"high-rise and low-rise buildings\" " }, { "id": 14199, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Elizabeth Stewart\"" }, { "id": 14200, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 14201, "SQL": "select max(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 = \"Troy Lucas\" and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 14202, "SQL": "select transaction_date 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 = \"Grapefruit oil\" order by transaction_date asc limit 1 " }, { "id": 14203, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Aircraft rental or leasing\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 14204, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Raymond Cardenas\"" }, { "id": 14205, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Decks and Patios\") and vendor = \"Matthew Adams\"" }, { "id": 14206, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Therapeutic services\") and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 14207, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 14208, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 14209, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") group by billing_city" }, { "id": 14210, "SQL": "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 other outdoor maintenance services\") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 14211, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Amanda Stone\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 14212, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"David Gutierrez\" order by transaction_date limit 1" }, { "id": 14213, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") and account_type in ('Expense','Other Expense') " }, { "id": 14214, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Teen outreach services\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 14215, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"William Allen\" and transaction_type = 'invoice'" }, { "id": 14216, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"John Medina\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) )" }, { "id": 14217, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Shawn Stokes\" ) " }, { "id": 14218, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Kevin Vincent\" and transaction_type = 'invoice'" }, { "id": 14219, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Chase Herrera\" order by transaction_date limit 1" }, { "id": 14220, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by billing_city" }, { "id": 14221, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Automobile\") and vendor = \"Daniel Cochran\"" }, { "id": 14222, "SQL": "select sum(credit) from master_txn_table where product_service = \"attached and detached units\" and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 14223, "SQL": "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,\"Bowling equipment and supply retailing\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 14224, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Robert Ellis\" ) " }, { "id": 14225, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Samantha Parker\" ) " }, { "id": 14226, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Sarah Ball\"" }, { "id": 14227, "SQL": "select transaction_id from master_txn_table where customers = \"Lance Reynolds\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 14228, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') group by billing_city" }, { "id": 14229, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Refunds-Allowances\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 14230, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 14231, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Heavy construction equipment\" " }, { "id": 14232, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Mario Keller\" ) " }, { "id": 14233, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"General contracting\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 14234, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Kathy Mitchell\" order by transaction_date limit 1" }, { "id": 14235, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Insurance\") and vendor = \"Andrea Burke\"" }, { "id": 14236, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"David Prince\"" }, { "id": 14237, "SQL": "select transaction_date 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 = \"Motorbike\" order by transaction_date asc limit 1 " }, { "id": 14238, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Offering equity market neutral funds\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 14239, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Traci Irwin\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) )" }, { "id": 14240, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Virginia Coleman\" order by transaction_date limit 1" }, { "id": 14241, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Brent Mckinney\"" }, { "id": 14242, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Hannah Brown\" ) " }, { "id": 14243, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Deborah Thompson\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') ) " }, { "id": 14244, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ruth Galvan\" ) " }, { "id": 14245, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Shirley Howell\"" }, { "id": 14246, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brian Jensen\" ) " }, { "id": 14247, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jamie Burton\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 14248, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) group by billing_city" }, { "id": 14249, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 14250, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Morgan Smith\" ) " }, { "id": 14251, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Equipment Rental\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 14252, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Charles Bautista\" ) " }, { "id": 14253, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Corey Liu\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 14254, "SQL": "select transaction_date 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 = \"Coordinators\" order by transaction_date asc limit 1 " }, { "id": 14255, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Shannon Collins\" ) " }, { "id": 14256, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Richard Park\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 14257, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Gregory Baird\" ) " }, { "id": 14258, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Carla Dunn\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 14259, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Michele Walker\" ) " }, { "id": 14260, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 14261, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Brittany Johns MD\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 14262, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 14263, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Anne Hernandez\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 14264, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Rachael Tanner\" ) " }, { "id": 14265, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Jason Peterson\"" }, { "id": 14266, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Jessica Rogers\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 14267, "SQL": "select transaction_date 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 = \"Golf Instructions\" order by transaction_date asc limit 1 " }, { "id": 14268, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Latoya Wilkins\" order by transaction_date limit 1" }, { "id": 14269, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) group by billing_city" }, { "id": 14270, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 14271, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 14272, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Logan Hale\" ) " }, { "id": 14273, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"John Kelly\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date) AND date(current_date) ) " }, { "id": 14274, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by billing_city" }, { "id": 14275, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by billing_city" }, { "id": 14276, "SQL": "select transaction_id from master_txn_table where product_service = \"Equity long/short\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 14277, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Constructing bangalow\") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 14278, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Vincent Roberts\" order by transaction_date limit 1" }, { "id": 14279, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Jimmy Conner\"" }, { "id": 14280, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Tracey Douglas\" order by transaction_date limit 1" }, { "id": 14281, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Karen Smith\"" }, { "id": 14282, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Maintenance and Repairs\") and vendor = \"Madison Walker\"" }, { "id": 14283, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 14284, "SQL": "select sum(credit) from master_txn_table where product_service = \"Home care\" and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 14285, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Tammy Davis\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 14286, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Teresa Ashley\"" }, { "id": 14287, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Office Expenses\") and vendor = \"Emily Chang\"" }, { "id": 14288, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Wardrobe\" " }, { "id": 14289, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kimberly Baker\" ) " }, { "id": 14290, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Gary Alvarado\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) )" }, { "id": 14291, "SQL": "select transaction_id from master_txn_table where customers = \"Brandy Burns\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 14292, "SQL": "select transaction_id from master_txn_table where product_service = \"Construction activities\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 14293, "SQL": "select transaction_id from master_txn_table where customers = \"Sean Perez\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 14294, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"attached and detached units\" " }, { "id": 14295, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Tammy French\" ) " }, { "id": 14296, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 14297, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 14298, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Breeding\" " }, { "id": 14299, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Commissions & fees\") and vendor = \"Suzanne Cox\"" }, { "id": 14300, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jennifer Newman\" ) " }, { "id": 14301, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 14302, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Angela Dominguez\" ) " }, { "id": 14303, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Marilyn Roth\" ) " }, { "id": 14304, "SQL": "select transaction_date 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 = \"Window washing\" order by transaction_date asc limit 1 " }, { "id": 14305, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 14306, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Rita Chambers\" ) " }, { "id": 14307, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Diane Harrington' or vendor = 'Diane Harrington'" }, { "id": 14308, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"food and beverage services\") and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 14309, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 14310, "SQL": "select sum(credit) from master_txn_table where product_service = \"Hydrogen\" and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 14311, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Patricia Brooks\" and transaction_type = 'invoice'" }, { "id": 14312, "SQL": "select sum(credit) from master_txn_table where product_service = \"Railroad Equipment\" and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 14313, "SQL": "select transaction_id from master_txn_table where customers = \"Eric Mccormick\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 14314, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Ventilation cleaning\" " }, { "id": 14315, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Maintenance and Repairs\") and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 14316, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Baby strollers\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 14317, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Inorganic Gases\" " }, { "id": 14318, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Nicole Gonzalez\"" }, { "id": 14319, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') group by billing_city" }, { "id": 14320, "SQL": "select transaction_id from master_txn_table where customers = \"Ashley Ryan\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 14321, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Commissions & fees\") and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 14322, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Elizabeth Rich\" ) " }, { "id": 14323, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Timothy Wagner\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) )" }, { "id": 14324, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 14325, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Miss Danielle Allen\" ) " }, { "id": 14326, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Snow removal services\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 14327, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lauren Garner\" ) " }, { "id": 14328, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 14329, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"License fees\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 14330, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jason Floyd\" ) " }, { "id": 14331, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Crystal Park\" ) " }, { "id": 14332, "SQL": "select transaction_id from master_txn_table where product_service = \"Gifts and grants\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 14333, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Citronella oil\" " }, { "id": 14334, "SQL": "select transaction_id from master_txn_table where customers = \"Diane Hart\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 14335, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 14336, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Adam Powell\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 14337, "SQL": "select transaction_id from master_txn_table where customers = \"Stephanie Washington\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 14338, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Bryce Ruiz\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') ) " }, { "id": 14339, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Cost of Labor\") and vendor = \"Justin Cowan\"" }, { "id": 14340, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Susan Sanchez\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 14341, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 14342, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Tamara Rivera\" ) " }, { "id": 14343, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 14344, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Paula Barton\" order by transaction_date limit 1" }, { "id": 14345, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Patricia Mueller\" order by transaction_date limit 1" }, { "id": 14346, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 14347, "SQL": "select sum(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Nursing and health\" " }, { "id": 14348, "SQL": "select product_service, 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 transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') group by product_service order by sum(credit) desc limit 1" }, { "id": 14349, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Telephone\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 14350, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Christopher Clarke\"" }, { "id": 14351, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 14352, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Ventilation cleaning\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 14353, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Donna Ballard\" ) " }, { "id": 14354, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Nicole Miranda\" ) " }, { "id": 14355, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 14356, "SQL": "select transaction_date 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 = \"Breeding\" order by transaction_date asc limit 1 " }, { "id": 14357, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Maintenance and Repairs\") and vendor = \"Tiffany Cole\"" }, { "id": 14358, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Stacey Smith\" ) " }, { "id": 14359, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 14360, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Samuel Bowen\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) )" }, { "id": 14361, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Installation\") and vendor = \"Karen Thomas\"" }, { "id": 14362, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Vanessa Espinoza\" order by transaction_date limit 1" }, { "id": 14363, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 14364, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') group by billing_city" }, { "id": 14365, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ryan Walker\" ) " }, { "id": 14366, "SQL": "select transaction_id from master_txn_table where customers = \"Carolyn Turner\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 14367, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Charles Ramirez\" order by transaction_date limit 1" }, { "id": 14368, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Michael Patterson\" and transaction_type = 'payment' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') ) " }, { "id": 14369, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 14370, "SQL": "select sum(credit) from master_txn_table where product_service = \"Aeronautical Equipment\" and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 14371, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Manufacturing citronella oil\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 14372, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Nicholas Perez\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 14373, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jeremiah Nguyen\" and transaction_type = 'invoice'" }, { "id": 14374, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 14375, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Megan Krueger\" ) " }, { "id": 14376, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 14377, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 14378, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Michael Stanton\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 14379, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Bridget Nicholson\" ) " }, { "id": 14380, "SQL": "select max(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 = \"Jared Tucker\" and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 14381, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Doris Goodman\"" }, { "id": 14382, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Stephanie Petty\"" }, { "id": 14383, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lori Anderson\" ) " }, { "id": 14384, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Richard Pierce\" ) " }, { "id": 14385, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"James Mann\" ) " }, { "id": 14386, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by billing_city" }, { "id": 14387, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Bookkeeper\") and vendor = \"Jessica Davis\"" }, { "id": 14388, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Gabriella Weaver' or vendor = 'Gabriella Weaver'" }, { "id": 14389, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 14390, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Asset management\") and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 14391, "SQL": "select sum(credit) from master_txn_table where product_service = \"Farrier\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 14392, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Alicia Farmer\" ) " }, { "id": 14393, "SQL": "select max(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 = \"Joseph Guerrero\" and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 14394, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Wholesaling railroad cars\") and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 14395, "SQL": "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,\"Fluorocarbon gases manufacturing\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 14396, "SQL": "select transaction_date 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 = \"Well casings\" order by transaction_date asc limit 1 " }, { "id": 14397, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jeremy Hubbard\" ) " }, { "id": 14398, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"David Johnston\" ) " }, { "id": 14399, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 14400, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Penny Merritt\" ) " }, { "id": 14401, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Denise Fowler\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') ) " }, { "id": 14402, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Coal Power generation\") and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 14403, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Tanner Garrison\" ) " }, { "id": 14404, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Scott Garza\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 14405, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Utilities\") and vendor = \"Audrey Green\"" }, { "id": 14406, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"James Sanford\" and transaction_type = 'invoice'" }, { "id": 14407, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kenneth Medina\" ) " }, { "id": 14408, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 14409, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 14410, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Tony Case\" order by transaction_date limit 1" }, { "id": 14411, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 14412, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Seth Rodriguez\" and transaction_type = 'payment' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') ) " }, { "id": 14413, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Deborah Vincent\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') ) " }, { "id": 14414, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Shane English\" ) " }, { "id": 14415, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Anna Lambert\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") ) " }, { "id": 14416, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Bobby Thomas\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 14417, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Timothy Hall\" ) " }, { "id": 14418, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' 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') " }, { "id": 14419, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Melanie Humphrey\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 14420, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lindsey Hickman DVM\" ) " }, { "id": 14421, "SQL": "select product_service, 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 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') group by product_service order by sum(credit) desc limit 1" }, { "id": 14422, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Richard Vega MD\" ) " }, { "id": 14423, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Kevin Mccormick\" and transaction_type = 'invoice'" }, { "id": 14424, "SQL": "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 construction activities\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 14425, "SQL": "select transaction_id from master_txn_table where customers = \"Jordan Stone\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 14426, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 14427, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Peter Dunn\"" }, { "id": 14428, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) group by billing_city" }, { "id": 14429, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Holly Bishop\" ) " }, { "id": 14430, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Brian Dennis\" and transaction_type = 'invoice'" }, { "id": 14431, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Courtney Thompson\" ) " }, { "id": 14432, "SQL": "select transaction_date 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 = \"Boat\" order by transaction_date asc limit 1 " }, { "id": 14433, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ruben Nguyen\" ) " }, { "id": 14434, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name 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 account_type in ('Expense','Other Expense') " }, { "id": 14435, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Shirley Padilla\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 14436, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Wholesaling aircraft engines and parts\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 14437, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"William Gonzales\" ) " }, { "id": 14438, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Food & drink\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 14439, "SQL": "select min(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 = \"Ashley Lyons\" and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 14440, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 14441, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brian Rocha\" ) " }, { "id": 14442, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 14443, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jessica Wilson\" and transaction_type = 'invoice'" }, { "id": 14444, "SQL": "select sum(credit) from master_txn_table where product_service = \"Hydrogen\" and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 14445, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by billing_city" }, { "id": 14446, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') group by billing_city" }, { "id": 14447, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Donna Garza\" ) " }, { "id": 14448, "SQL": "select transaction_date 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 = \"Well casings\" order by transaction_date asc limit 1 " }, { "id": 14449, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Business process management\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 14450, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Diving equipment retailing\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 14451, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Laura Dudley\" order by transaction_date limit 1" }, { "id": 14452, "SQL": "select transaction_date from master_txn_table where customers = \"Jerry Grimes\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 14453, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Youth guidance\" " }, { "id": 14454, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Sarah Mcguire' or vendor = 'Sarah Mcguire'" }, { "id": 14455, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 14456, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Amy Richmond\" ) " }, { "id": 14457, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Garrett Rice\" ) " }, { "id": 14458, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Chelsea Wood\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 14459, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Laurie Phelps\" ) " }, { "id": 14460, "SQL": "select transaction_id from master_txn_table where product_service = \"Government Purposes\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 14461, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"William Terry\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) ) " }, { "id": 14462, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Dan Kaufman\" ) " }, { "id": 14463, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 14464, "SQL": "select transaction_date from master_txn_table where customers = \"Megan Petersen\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 14465, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Bookkeeper\") and vendor = \"Jeffrey Cruz\"" }, { "id": 14466, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 14467, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Anthony Keith\" and transaction_type = 'payment' and 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') ) " }, { "id": 14468, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 14469, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Kelly Peterson\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date) AND date(current_date) )" }, { "id": 14470, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Melissa Knapp\"" }, { "id": 14471, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Luis Johnson\" ) " }, { "id": 14472, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 14473, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Emily Russell\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) )" }, { "id": 14474, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Chase Russell' or vendor = 'Chase Russell'" }, { "id": 14475, "SQL": "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,\"Baby toys\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 14476, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 14477, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Bethany Ramirez\" ) " }, { "id": 14478, "SQL": "select product_service, 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 transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') group by product_service order by sum(credit) desc limit 1" }, { "id": 14479, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Christine Stark\" order by transaction_date limit 1" }, { "id": 14480, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brian Gilbert\" ) " }, { "id": 14481, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 14482, "SQL": "select transaction_date from master_txn_table where customers = \"Joanne Smith\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 14483, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Kim Cook\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 14484, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brenda Brown\" ) " }, { "id": 14485, "SQL": "select min(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 = \"William York\" and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 14486, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 14487, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by billing_city" }, { "id": 14488, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 14489, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Glenn Gonzalez\" ) " }, { "id": 14490, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') group by billing_city" }, { "id": 14491, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 14492, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Charles Scott\" and transaction_type = 'invoice'" }, { "id": 14493, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Computer software and software application training\") and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 14494, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Robert Moody\" order by transaction_date limit 1" }, { "id": 14495, "SQL": "select transaction_id from master_txn_table where customers = \"Felicia Ryan\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 14496, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Darryl Cannon\" ) " }, { "id": 14497, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 14498, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Joshua Nelson\"" }, { "id": 14499, "SQL": "select min(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 = \"Gregory Pittman\" and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 14500, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 14501, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 14502, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Holly Daniels\" order by transaction_date limit 1" }, { "id": 14503, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 14504, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Ronald Cameron\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 14505, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Data entry services\") and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 14506, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Wholesaling locomotives\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 14507, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Michele Vance\" ) " }, { "id": 14508, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 14509, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Care-planning\" " }, { "id": 14510, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 14511, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Valerie Morrison\"" }, { "id": 14512, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Street vending locations\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 14513, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Orange oil\" " }, { "id": 14514, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Auto mobiles\" " }, { "id": 14515, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Lindsey Owens\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 14516, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Michael Ramirez\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) )" }, { "id": 14517, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"William Dixon\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 14518, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Medical services\") and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 14519, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Willie Weber\" ) " }, { "id": 14520, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Abigail Herrera\" ) " }, { "id": 14521, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Intravenous therapy\") and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 14522, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 14523, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 14524, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Richard Johnson\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 14525, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Popular music shows\" " }, { "id": 14526, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 14527, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Saddlery retailing\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 14528, "SQL": "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,\"Process management\") and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 14529, "SQL": "select transaction_date 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 = \"Dealing\" order by transaction_date asc limit 1 " }, { "id": 14530, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by billing_city" }, { "id": 14531, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Nancy Garcia\" ) " }, { "id": 14532, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 14533, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Amy Romero\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') ) " }, { "id": 14534, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Meghan Sanchez\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 14535, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Providing brokerage services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 14536, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Terry Martinez\" ) " }, { "id": 14537, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 14538, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Acidizing and chemically treating wells\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 14539, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ian Austin\" ) " }, { "id": 14540, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Fluorocarbon gases manufacturing\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 14541, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 14542, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Christopher Raymond\"" }, { "id": 14543, "SQL": "select transaction_date from master_txn_table where customers = \"Timothy Kim\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 14544, "SQL": "select product_service, 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 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') group by product_service order by sum(credit) desc limit 1" }, { "id": 14545, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Ashlee Hoffman\" and account_type in ('Expense','Other Expense') 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') " }, { "id": 14546, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') and account_type in ('Expense','Other Expense') " }, { "id": 14547, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Joseph Ho\" ) " }, { "id": 14548, "SQL": "select transaction_id from master_txn_table where customers = \"Richard Mata\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 14549, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 14550, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"James Burke\" ) " }, { "id": 14551, "SQL": "select transaction_date from master_txn_table where customers = \"Amy French\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 14552, "SQL": "select avg(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 = \"Michael Fleming\" and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 14553, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by billing_city" }, { "id": 14554, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Karen Bruce\" ) " }, { "id": 14555, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Jason Ewing\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 14556, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Providing loading and unloading services at rail terminals\") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 14557, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Christine Salazar\"" }, { "id": 14558, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 14559, "SQL": "select transaction_id from master_txn_table where product_service = \"Brokerage\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 14560, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 14561, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Catherine Branch\" ) " }, { "id": 14562, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounting\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 14563, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Rebecca Holder\" ) " }, { "id": 14564, "SQL": "select transaction_date from master_txn_table where customers = \"Jonathan Durham\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 14565, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Kaitlyn Dorsey\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 14566, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Erik Richards\" ) " }, { "id": 14567, "SQL": "select max(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 = \"Stephanie Ball\" and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 14568, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Natalie Leach\" ) " }, { "id": 14569, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Frances Cisneros\" ) " }, { "id": 14570, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Tina Grant\" ) " }, { "id": 14571, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Malik Byrd\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 14572, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kathryn Torres\" ) " }, { "id": 14573, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date) AND date(current_date) group by billing_city" }, { "id": 14574, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 14575, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kenneth Farmer\" ) " }, { "id": 14576, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Valerie Barber\" ) " }, { "id": 14577, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Emily Santos\" ) " }, { "id": 14578, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') group by billing_city" }, { "id": 14579, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Recognition software for government and legal purposes\") and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 14580, "SQL": "select transaction_id from master_txn_table where product_service = \"Organic Gases\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 14581, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Matthew Ross\" ) " }, { "id": 14582, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Manufacturing grapefruit oil\") and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 14583, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") order by sum(debit) desc limit 1" }, { "id": 14584, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"David Rojas\" ) " }, { "id": 14585, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Kristina Nguyen\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') )" }, { "id": 14586, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Promotional\") and vendor = \"John Lee\"" }, { "id": 14587, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 14588, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") and account_type in ('Expense','Other Expense') " }, { "id": 14589, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Macro\" " }, { "id": 14590, "SQL": "select min(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 = \"Dennis Wyatt\" and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 14591, "SQL": "select transaction_id from master_txn_table where product_service = \"Traveller accomodation\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 14592, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Mary Scott\" ) " }, { "id": 14593, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Kevin Moreno\" and account_type in ('Expense','Other Expense') and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 14594, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') order by sum(debit) desc limit 1" }, { "id": 14595, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Paul Newman\" ) " }, { "id": 14596, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Kelly Norman\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') ) " }, { "id": 14597, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Rita Chambers\" ) " }, { "id": 14598, "SQL": "select transaction_date 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 = \"Invitations\" order by transaction_date asc limit 1 " }, { "id": 14599, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 14600, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Physical therapy\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 14601, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Erin Silva\" order by transaction_date limit 1" }, { "id": 14602, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 14603, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Raymond Ward\" ) " }, { "id": 14604, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Alex Myers\" ) " }, { "id": 14605, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 14606, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Mark Clark\" ) " }, { "id": 14607, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Isabella Monroe\" and transaction_type = 'invoice'" }, { "id": 14608, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ryan Robertson\" ) " }, { "id": 14609, "SQL": "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,\"Parking lot and driveway washing\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 14610, "SQL": "select transaction_date from master_txn_table where customers = \"Jeffery Williams\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 14611, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 14612, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Casey King\" ) " }, { "id": 14613, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jeffrey Craig\" ) " }, { "id": 14614, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Transportation services\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 14615, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Brittany Haynes\"" }, { "id": 14616, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Reginald Medina\"" }, { "id": 14617, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Tiffany Thomas\" ) " }, { "id": 14618, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jesus Griffin\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 14619, "SQL": "select product_service, 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 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') group by product_service order by sum(credit) desc limit 1" }, { "id": 14620, "SQL": "select avg(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 = \"Steven Church\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 14621, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Peter Hamilton\"" }, { "id": 14622, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Jacob Phillips\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) ) " }, { "id": 14623, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Building Repairs\") and vendor = \"Bradley Carter\"" }, { "id": 14624, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Alyssa Newman\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 14625, "SQL": "select sum(credit) from master_txn_table where product_service = \"Coordinators\" and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 14626, "SQL": "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,\"Design income\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 14627, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brandon Osborne\" ) " }, { "id": 14628, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Legal & Professional Fees\") and vendor = \"Jesse Bender\"" }, { "id": 14629, "SQL": "select transaction_date 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 = \"Physical Therapy\" order by transaction_date asc limit 1 " }, { "id": 14630, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') group by billing_city" }, { "id": 14631, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Debra Matthews\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 14632, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") order by sum(debit) desc limit 1" }, { "id": 14633, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Justin Faulkner\"" }, { "id": 14634, "SQL": "select transaction_date from master_txn_table where customers = \"Victoria Bauer\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 14635, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 14636, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Mary Gordon\" ) " }, { "id": 14637, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 14638, "SQL": "select sum(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Railcar\" " }, { "id": 14639, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Joshua Fisher\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 14640, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") and account_type in ('Expense','Other Expense') " }, { "id": 14641, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 14642, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Seth Glass\" order by transaction_date limit 1" }, { "id": 14643, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Micheal Stephenson\" order by transaction_date limit 1" }, { "id": 14644, "SQL": "select transaction_date from master_txn_table where customers = \"Derrick Watson\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 14645, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 14646, "SQL": "select transaction_id from master_txn_table where customers = \"Jessica Wyatt\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 14647, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 14648, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Seth Roberts\" ) " }, { "id": 14649, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 14650, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Katie Dawson\" ) " }, { "id": 14651, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 14652, "SQL": "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 navigational instruments (except electronic)\") 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') " }, { "id": 14653, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Hunter Zamora' or vendor = 'Hunter Zamora'" }, { "id": 14654, "SQL": "select transaction_date from master_txn_table where customers = \"Manuel Cooper\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 14655, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Evan Bartlett IV\" order by transaction_date limit 1" }, { "id": 14656, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jacqueline Mills\" ) " }, { "id": 14657, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Stacey Lopez\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 14658, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Melvin King\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 14659, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 14660, "SQL": "select transaction_date 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 = \"Industrial manufacturing\" order by transaction_date asc limit 1 " }, { "id": 14661, "SQL": "select transaction_date 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 = \"Diving\" order by transaction_date asc limit 1 " }, { "id": 14662, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sherry Walsh\" ) " }, { "id": 14663, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Derrick Logan\"" }, { "id": 14664, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Amusement and recreation services\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 14665, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Providing 24-hour home care\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 14666, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 14667, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Ryan Dickson\"" }, { "id": 14668, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kenneth Mitchell\" ) " }, { "id": 14669, "SQL": "select transaction_date 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 = \"Personal Care\" order by transaction_date asc limit 1 " }, { "id": 14670, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Meal services\") and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 14671, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 14672, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Paul Macdonald\" and transaction_type = 'invoice'" }, { "id": 14673, "SQL": "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,\"Miscellaneous services\") and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 14674, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kristie Wyatt\" ) " }, { "id": 14675, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Snow removal services\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 14676, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Photocopying\" " }, { "id": 14677, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Jessica Holder\"" }, { "id": 14678, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Andre West\" and transaction_type = 'invoice'" }, { "id": 14679, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Jessica Morales MD\"" }, { "id": 14680, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 14681, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Outdoor goods\" " }, { "id": 14682, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 14683, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jessica Underwood\" and transaction_type = 'invoice'" }, { "id": 14684, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jason Campos\" order by transaction_date limit 1" }, { "id": 14685, "SQL": "select transaction_date from master_txn_table where customers = \"Barry Thomas\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 14686, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Intravenous therapy\") and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 14687, "SQL": "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,\"Uncategorized Expense\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 14688, "SQL": "select transaction_date from master_txn_table where customers = \"Angela Sullivan\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 14689, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Holly Mcneil\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 14690, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Rodney Franklin\" and transaction_type = 'invoice'" }, { "id": 14691, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Stacey Miller\" and transaction_type = 'invoice'" }, { "id": 14692, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Megan Hill\" ) " }, { "id": 14693, "SQL": "select sum(credit) from master_txn_table where product_service = \"Data processing computer\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 14694, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Kaitlyn Reyes\" order by transaction_date limit 1" }, { "id": 14695, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Dylan Aguirre\" ) " }, { "id": 14696, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) group by billing_city" }, { "id": 14697, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Rhonda Velasquez\" and transaction_type = 'invoice'" }, { "id": 14698, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Crystal Ortiz' or vendor = 'Crystal Ortiz'" }, { "id": 14699, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Larry Smith\" ) " }, { "id": 14700, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 14701, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Erika Brooks\" order by transaction_date limit 1" }, { "id": 14702, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Yolanda Chang\"" }, { "id": 14703, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jennifer Fleming\" ) " }, { "id": 14704, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Todd Bates\" ) " }, { "id": 14705, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Roger Thompson\" ) " }, { "id": 14706, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Fuel\") and vendor = \"Victoria Delacruz\"" }, { "id": 14707, "SQL": "select transaction_id from master_txn_table where customers = \"Angela Perkins\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 14708, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Robin Ramirez\" ) " }, { "id": 14709, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 14710, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') 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') group by billing_city" }, { "id": 14711, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 14712, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 14713, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"David Rojas\" ) " }, { "id": 14714, "SQL": "select transaction_date from master_txn_table where customers = \"Chad Herrera\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 14715, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"David Rose\" ) " }, { "id": 14716, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Angela Santos\" ) " }, { "id": 14717, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Transportation services\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 14718, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Melissa Alvarez\" ) " }, { "id": 14719, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Meghan Lewis\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") )" }, { "id": 14720, "SQL": "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,\"Private parcel mailing centers\") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 14721, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Meredith Cuevas\" ) " }, { "id": 14722, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 14723, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Fernando Delgado\" ) " }, { "id": 14724, "SQL": "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 courses through business schools\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 14725, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') and account_type in ('Expense','Other Expense') " }, { "id": 14726, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') group by billing_city" }, { "id": 14727, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Penny Long\" and transaction_type = 'payment' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') )" }, { "id": 14728, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Cory Massey\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date) AND date(current_date) )" }, { "id": 14729, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Matthew Walter\" ) " }, { "id": 14730, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"James Russell\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') )" }, { "id": 14731, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 14732, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Tami Ortiz\" ) " }, { "id": 14733, "SQL": "select sum(credit) from master_txn_table where product_service = \"Barge\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 14734, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Fuel\") and vendor = \"Gary Ward\"" }, { "id": 14735, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 14736, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' 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') " }, { "id": 14737, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Wind Power generation\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 14738, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Kyle Mclean' or vendor = 'Kyle Mclean'" }, { "id": 14739, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Stephanie Young\" ) " }, { "id": 14740, "SQL": "select transaction_id from master_txn_table where product_service = \"Helium\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 14741, "SQL": "select transaction_date 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 = \"Surveying wells\" order by transaction_date asc limit 1 " }, { "id": 14742, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 14743, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kari Gallagher\" ) " }, { "id": 14744, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 14745, "SQL": "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,\"Insurance\") and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 14746, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"William Hanna\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") )" }, { "id": 14747, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' 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') " }, { "id": 14748, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 14749, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Elizabeth Wang\" ) " }, { "id": 14750, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jessica Brown\" ) " }, { "id": 14751, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 14752, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') and account_type in ('Expense','Other Expense') " }, { "id": 14753, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 14754, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Application hosting\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 14755, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Joshua Jones\" ) " }, { "id": 14756, "SQL": "select max(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 = \"Desiree Phillips\" and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 14757, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jack Martinez\" ) " }, { "id": 14758, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Brendan Callahan\" order by transaction_date limit 1" }, { "id": 14759, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Retailing Wardrobe\") and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 14760, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Diana Cisneros' or vendor = 'Diana Cisneros'" }, { "id": 14761, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and 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') " }, { "id": 14762, "SQL": "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 engines and parts\") and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 14763, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Golf equipment and supply retailing\") and 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') " }, { "id": 14764, "SQL": "select sum(credit) from master_txn_table where product_service = \"Transportation\" and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 14765, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Lori Velasquez\" and transaction_type = 'invoice'" }, { "id": 14766, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 14767, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 14768, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 14769, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 14770, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jerry Edwards\" ) " }, { "id": 14771, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Wholesaling navigational instruments (except electronic)\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 14772, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 14773, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Heather Marsh\" and transaction_type = 'payment' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') )" }, { "id": 14774, "SQL": "select transaction_id from master_txn_table where product_service = \"Boat\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 14775, "SQL": "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,\"Appearances and speeches\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 14776, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Christopher Lowe\" ) " }, { "id": 14777, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Constructing duplexes\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 14778, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"John Baker\" ) " }, { "id": 14779, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') group by billing_city" }, { "id": 14780, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Dale Villanueva\" order by transaction_date limit 1" }, { "id": 14781, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by billing_city" }, { "id": 14782, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Providing courses through business schools\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 14783, "SQL": "select avg(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 = \"David Walters\" and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 14784, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Web hosting\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 14785, "SQL": "select transaction_date 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 = \"Commodity Markets\" order by transaction_date asc limit 1 " }, { "id": 14786, "SQL": "select transaction_date 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 = \"Trust and Fiduciary\" order by transaction_date asc limit 1 " }, { "id": 14787, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Rachel Alvarez\" ) " }, { "id": 14788, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Shannon Richardson\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) ) " }, { "id": 14789, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 14790, "SQL": "select transaction_date 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 = \"Railroad switching\" order by transaction_date asc limit 1 " }, { "id": 14791, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jerome Ramsey\" ) " }, { "id": 14792, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Manufacturing orange oil\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 14793, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Madison Brown\" ) " }, { "id": 14794, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Tina Brown\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 14795, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by billing_city" }, { "id": 14796, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Ashley Richardson\"" }, { "id": 14797, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Austin Cardenas\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) )" }, { "id": 14798, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Repairing locomotives and railcars (except factory conversion, overhaul and rebuilding)\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 14799, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Thomas Floyd\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 14800, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 14801, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Austin Houston\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) ) " }, { "id": 14802, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Michele Miller\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 14803, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brooke Hayes\" ) " }, { "id": 14804, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Megan Richards\"" }, { "id": 14805, "SQL": "select transaction_date 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 = \"Life cycle asset management\" order by transaction_date asc limit 1 " }, { "id": 14806, "SQL": "select transaction_id from master_txn_table where customers = \"Sharon Vasquez\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 14807, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Matthew Little\" order by transaction_date limit 1" }, { "id": 14808, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 14809, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 14810, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Edward Shaffer\" order by transaction_date limit 1" }, { "id": 14811, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 14812, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Timothy Powell\"" }, { "id": 14813, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 14814, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 14815, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"William Allen\" ) " }, { "id": 14816, "SQL": "select sum(credit) from master_txn_table where product_service = \"Macs\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 14817, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Virginia Wilson\" and transaction_type = 'payment' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') )" }, { "id": 14818, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 14819, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Drain cleaning\") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 14820, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Susan Yu\"" }, { "id": 14821, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 14822, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 14823, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Local area network management training\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 14824, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Bank Charges\") and vendor = \"Jeffrey Brown\"" }, { "id": 14825, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jessica Bowen\" ) " }, { "id": 14826, "SQL": "select transaction_date from master_txn_table where customers = \"Edward Pennington\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 14827, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Robert Manning\" ) " }, { "id": 14828, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Car seats\" " }, { "id": 14829, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Cheryl Calderon\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 14830, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Travis Christensen\" ) " }, { "id": 14831, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 14832, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Caitlyn Jackson' or vendor = 'Caitlyn Jackson'" }, { "id": 14833, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Richard Herrera\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 14834, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 14835, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Uncategorized Income\") and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 14836, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') 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') order by sum(debit) desc limit 1" }, { "id": 14837, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Casey Parker\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 14838, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') order by sum(debit) desc limit 1" }, { "id": 14839, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 14840, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 14841, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 14842, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Jacob Boyd\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 14843, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Amber Kidd\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 14844, "SQL": "select min(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 = \"Mark Medina\" and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 14845, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 14846, "SQL": "select transaction_date 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 = \"Tournaments and Matches\" order by transaction_date asc limit 1 " }, { "id": 14847, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Randy Fleming\" ) " }, { "id": 14848, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 14849, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Mark Bolton\" and transaction_type = 'payment' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') )" }, { "id": 14850, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)group by product_service order by sum(credit) desc limit 1" }, { "id": 14851, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by billing_city" }, { "id": 14852, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 14853, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Chelsea Stafford\" order by transaction_date limit 1" }, { "id": 14854, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Brian Higgins\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) ) " }, { "id": 14855, "SQL": "select transaction_id from master_txn_table where product_service = \"Towboat\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 14856, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Physical therapy\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 14857, "SQL": "select transaction_date from master_txn_table where customers = \"Jared Jones\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 14858, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Charles Torres\"" }, { "id": 14859, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Duct and gutter cleaning\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 14860, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Abigail Hughes\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 14861, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Timothy Murphy\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 14862, "SQL": "select transaction_date 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 = \"Equity Market Neutral\" order by transaction_date asc limit 1 " }, { "id": 14863, "SQL": "select product_service, 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 transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') group by product_service order by sum(credit) desc limit 1" }, { "id": 14864, "SQL": "select transaction_id from master_txn_table where customers = \"Megan Key\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 14865, "SQL": "select max(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 = \"Stephen Williams\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 14866, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Vickie Harris\" ) " }, { "id": 14867, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Katherine Ramos\"" }, { "id": 14868, "SQL": "select transaction_id from master_txn_table where customers = \"Richard Carpenter\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 14869, "SQL": "select transaction_id from master_txn_table where product_service = \"Bicycle\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 14870, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Courtney Carpenter\" ) " }, { "id": 14871, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Jamie Patel' or vendor = 'Jamie Patel'" }, { "id": 14872, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Pamela Wilson\" and account_type in ('Expense','Other Expense') 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') " }, { "id": 14873, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Donna Vincent\"" }, { "id": 14874, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 14875, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"David Harris\"" }, { "id": 14876, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 14877, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Stephanie Sloan\" ) " }, { "id": 14878, "SQL": "select transaction_id from master_txn_table where product_service = \"Photography\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 14879, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') 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') order by sum(debit) desc limit 1" }, { "id": 14880, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 14881, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Gilbert Nelson\"" }, { "id": 14882, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Michelle Flynn\" ) " }, { "id": 14883, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lauren Gonzalez\" ) " }, { "id": 14884, "SQL": "select transaction_date from master_txn_table where customers = \"Alison Barton\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 14885, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Travel\") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 14886, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 14887, "SQL": "select transaction_date from master_txn_table where customers = \"William Munoz\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 14888, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 14889, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Joan Mcconnell\" and transaction_type = 'invoice'" }, { "id": 14890, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Melissa Knapp\" ) " }, { "id": 14891, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Isabella Kelly\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 14892, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Erik Adams\" ) " }, { "id": 14893, "SQL": "select sum(credit) from master_txn_table where product_service = \"Navigational Instruments\" 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') " }, { "id": 14894, "SQL": "select transaction_date from master_txn_table where customers = \"Mikayla Marshall\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 14895, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 14896, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Providing courses in computer programming\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 14897, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jose Nelson MD\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 14898, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Tammy Torres\" ) " }, { "id": 14899, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") and account_type in ('Expense','Other Expense') " }, { "id": 14900, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Lawrence Gross\" and transaction_type = 'invoice'" }, { "id": 14901, "SQL": "select sum(credit) from master_txn_table where product_service = \"Design\" and 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') " }, { "id": 14902, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Walter Willis\" ) " }, { "id": 14903, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Rhonda Calderon\" ) " }, { "id": 14904, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 14905, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Daisy Perez MD\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) )" }, { "id": 14906, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Paul Madden\"" }, { "id": 14907, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 14908, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Vanessa Flores' or vendor = 'Vanessa Flores'" }, { "id": 14909, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Government Purposes\" " }, { "id": 14910, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 14911, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Anna Mcdowell\" ) " }, { "id": 14912, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kimberly Woodward\" ) " }, { "id": 14913, "SQL": "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,\"Amusement and recreation services\") and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 14914, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 14915, "SQL": "select max(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 = \"Angela Curtis\" and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 14916, "SQL": "select transaction_id from master_txn_table where product_service = \"Dance\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 14917, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 14918, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by billing_city" }, { "id": 14919, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 14920, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Karen Bowman\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 14921, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'John Walters' or vendor = 'John Walters'" }, { "id": 14922, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 14923, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Commissions & fees\") and vendor = \"Tammy Johnson\"" }, { "id": 14924, "SQL": "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,\"Baby strollers\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 14925, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 14926, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Leslie Ware\"" }, { "id": 14927, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Theresa Yu\" ) " }, { "id": 14928, "SQL": "select avg(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 = \"April Kemp\" and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 14929, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Other nonnuclear power generation\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 14930, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Commissions & fees\") and vendor = \"Maria Kelly\"" }, { "id": 14931, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Gina Smith\" ) " }, { "id": 14932, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Elizabeth Liu\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 14933, "SQL": "select transaction_date from master_txn_table where customers = \"Roy Gay\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 14934, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Richard Ward\" and transaction_type = 'invoice'" }, { "id": 14935, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jaclyn Torres\" order by transaction_date limit 1" }, { "id": 14936, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Edward Pennington\" order by transaction_date limit 1" }, { "id": 14937, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Christopher Stanley\" and transaction_type = 'invoice'" }, { "id": 14938, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Richard Salinas\" ) " }, { "id": 14939, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 14940, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Natural oils\" " }, { "id": 14941, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Jimmy Mann' or vendor = 'Jimmy Mann'" }, { "id": 14942, "SQL": "select transaction_date from master_txn_table where customers = \"Christine Miller\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 14943, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Retailing master bedroom furniture\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 14944, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') 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') order by sum(debit) desc limit 1" }, { "id": 14945, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Suzanne Cox\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 14946, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Gary Johnson\" ) " }, { "id": 14947, "SQL": "select transaction_id from master_txn_table where product_service = \"Multi-strategy\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 14948, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Dylan Taylor\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date) AND date(current_date) ) " }, { "id": 14949, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jared Marshall\" order by transaction_date limit 1" }, { "id": 14950, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 14951, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Matthew Bryan\" ) " }, { "id": 14952, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"April Powell MD\" ) " }, { "id": 14953, "SQL": "select transaction_id from master_txn_table where customers = \"Christy Bennett\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 14954, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kyle Mcdaniel\" ) " }, { "id": 14955, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Robert Holloway\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) ) " }, { "id": 14956, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kenneth Howell\" ) " }, { "id": 14957, "SQL": "select transaction_id from master_txn_table where customers = \"Angela Carter\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 14958, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Web hosting\" " }, { "id": 14959, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Julie Campbell\"" }, { "id": 14960, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Tyler Howard\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 14961, "SQL": "select transaction_date 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 = \"Dietary and Nutritional\" order by transaction_date asc limit 1 " }, { "id": 14962, "SQL": "select sum(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Repair and Maintainenance\" " }, { "id": 14963, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 14964, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kevin Calhoun\" ) " }, { "id": 14965, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Javier Mays\" and transaction_type = 'invoice'" }, { "id": 14966, "SQL": "select transaction_id from master_txn_table where product_service = \"Ceremony & reception venue\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 14967, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 14968, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 14969, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jennifer Higgins\" ) " }, { "id": 14970, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') and account_type in ('Expense','Other Expense') " }, { "id": 14971, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Kathryn Schultz' or vendor = 'Kathryn Schultz'" }, { "id": 14972, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Ricky Pearson\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) ) " }, { "id": 14973, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Veronica Campbell\"" }, { "id": 14974, "SQL": "select avg(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 = \"Travis Moon\" and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 14975, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by billing_city" }, { "id": 14976, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Janet Madden\" ) " }, { "id": 14977, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Joseph Duncan\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 14978, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Kimberly Ramos\"" }, { "id": 14979, "SQL": "select sum(credit) from master_txn_table where product_service = \"Acetylene\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 14980, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Nancy Quinn\" and transaction_type = 'payment' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') )" }, { "id": 14981, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Diane Sanchez\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) ) " }, { "id": 14982, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 14983, "SQL": "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 = \"Thomas Blake\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 14984, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Randall Fields\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) ) " }, { "id": 14985, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 14986, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jasmine Miller\" ) " }, { "id": 14987, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"John Tucker\" ) " }, { "id": 14988, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 14989, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Vanessa Little\" ) " }, { "id": 14990, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Shawn Cunningham\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date) AND date(current_date) )" }, { "id": 14991, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Nitrogen\" " }, { "id": 14992, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by billing_city" }, { "id": 14993, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Lisa Hall\" order by transaction_date limit 1" }, { "id": 14994, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Michael Gregory\" order by transaction_date limit 1" }, { "id": 14995, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"William Campbell DVM\" ) " }, { "id": 14996, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") and account_type in ('Expense','Other Expense') " }, { "id": 14997, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") group by billing_city" }, { "id": 14998, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Susan Mcmahon\" ) " }, { "id": 14999, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jason Gonzalez\"" }, { "id": 15000, "SQL": "select sum(credit) from master_txn_table where product_service = \"Hacking Training\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 15001, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Summer Ellis' or vendor = 'Summer Ellis'" }, { "id": 15002, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') and account_type in ('Expense','Other Expense') " }, { "id": 15003, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Megan Yang\" ) " }, { "id": 15004, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Transportation services\") 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') " }, { "id": 15005, "SQL": "select transaction_date 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 = \"Nonmetallic mineral ore\" order by transaction_date asc limit 1 " }, { "id": 15006, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Travis Vazquez\" ) " }, { "id": 15007, "SQL": "select transaction_date 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 = \"Furniture\" order by transaction_date asc limit 1 " }, { "id": 15008, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 15009, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Amanda Brooks\" ) " }, { "id": 15010, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 15011, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") group by billing_city" }, { "id": 15012, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Emily Weber\"" }, { "id": 15013, "SQL": "select transaction_date 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 = \"LAN\" order by transaction_date asc limit 1 " }, { "id": 15014, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 15015, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and 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') " }, { "id": 15016, "SQL": "select transaction_id from master_txn_table where product_service = \"Packing\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 15017, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Providing railroad switching services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 15018, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 15019, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Antonio Scott\" ) " }, { "id": 15020, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Andrew Griffin\" order by transaction_date limit 1" }, { "id": 15021, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 15022, "SQL": "select transaction_date from master_txn_table where customers = \"Mary Stevens\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 15023, "SQL": "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,\"Quality management assessment\") and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 15024, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Tamara Webster\" and transaction_type = 'payment' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') ) " }, { "id": 15025, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 15026, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 15027, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Providing courses in computer programming\") and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 15028, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jackie Thornton\"" }, { "id": 15029, "SQL": "select transaction_date from master_txn_table where customers = \"Stephanie Daniels\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 15030, "SQL": "select transaction_id from master_txn_table where customers = \"Brandon Olson\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 15031, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"James Myers\" ) " }, { "id": 15032, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Guy Payne\" ) " }, { "id": 15033, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Joshua Gilbert\" ) " }, { "id": 15034, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Garrett Flynn\" order by transaction_date limit 1" }, { "id": 15035, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Laura Leach\" ) " }, { "id": 15036, "SQL": "select transaction_date 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 = \"Rental\" order by transaction_date asc limit 1 " }, { "id": 15037, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Adoption placement services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 15038, "SQL": "select max(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 = \"Daniel Weber\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 15039, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"John Arnold\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) )" }, { "id": 15040, "SQL": "select transaction_date from master_txn_table where customers = \"Nicole Palmer MD\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 15041, "SQL": "select transaction_date from master_txn_table where customers = \"Veronica Morris\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 15042, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Pamela Larson\" and transaction_type = 'payment' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') )" }, { "id": 15043, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Kimberly Ferguson\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 15044, "SQL": "select min(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 = \"James Sheppard\" and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 15045, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 15046, "SQL": "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 = \"Megan Stephens\" and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 15047, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Gerald Watts\" ) " }, { "id": 15048, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Loan Payable\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 15049, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Patricia Rice\" order by transaction_date limit 1" }, { "id": 15050, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Bicycle retailing\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 15051, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 15052, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jessica Meadows\"" }, { "id": 15053, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Rose Duarte\" and transaction_type = 'payment' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') )" }, { "id": 15054, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Megan Fernandez\" order by transaction_date limit 1" }, { "id": 15055, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 15056, "SQL": "select transaction_date from master_txn_table where customers = \"Miguel Gray\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 15057, "SQL": "select transaction_date from master_txn_table where customers = \"Alexander Cole\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 15058, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"James Cameron\" order by transaction_date limit 1" }, { "id": 15059, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Tracy Barrera\" ) " }, { "id": 15060, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Pamela Waters\" ) " }, { "id": 15061, "SQL": "select transaction_date 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 = \"Shunting trailers\" order by transaction_date asc limit 1 " }, { "id": 15062, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Advertising\") and vendor = \"Ashley Anderson\"" }, { "id": 15063, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Stephen Taylor\" order by transaction_date limit 1" }, { "id": 15064, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 15065, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Mathew Taylor\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 15066, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 15067, "SQL": "select transaction_id from master_txn_table where customers = \"Justin Smith\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 15068, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 15069, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Brianna Keller\" and transaction_type = 'invoice'" }, { "id": 15070, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Coal\" " }, { "id": 15071, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Purchases\") and vendor = \"Michael Davis\"" }, { "id": 15072, "SQL": "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 citronella oil\") and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 15073, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Anna Ferguson\" ) " }, { "id": 15074, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 15075, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Michelle Woods\" order by transaction_date limit 1" }, { "id": 15076, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Robert Adams II\" ) " }, { "id": 15077, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 15078, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 15079, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Jennifer Dunn' or vendor = 'Jennifer Dunn'" }, { "id": 15080, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Sandra Ramirez\"" }, { "id": 15081, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Running, cutting and pulling casings, tubes and rods\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 15082, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 15083, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 15084, "SQL": "select avg(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 = \"Paul Stein\" and 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') " }, { "id": 15085, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"William Huang\"" }, { "id": 15086, "SQL": "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,\"Offering distressed securities funds\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 15087, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Tina Green' or vendor = 'Tina Green'" }, { "id": 15088, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') group by billing_city" }, { "id": 15089, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Roberta Shaw\" order by transaction_date limit 1" }, { "id": 15090, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 15091, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') group by billing_city" }, { "id": 15092, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Lindsay Taylor\"" }, { "id": 15093, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jason Craig\" ) " }, { "id": 15094, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 15095, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 15096, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Yvonne Potter\" order by transaction_date limit 1" }, { "id": 15097, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Development of other voice and speech recognition products\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 15098, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 15099, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 15100, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Utilities\") and vendor = \"Stephen Blair\"" }, { "id": 15101, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Rebecca Sawyer\" ) " }, { "id": 15102, "SQL": "select transaction_id from master_txn_table where customers = \"Jacqueline Smith\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 15103, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') group by billing_city" }, { "id": 15104, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 15105, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 15106, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Design income\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 15107, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Lisa Weiss\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 15108, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Danielle Butler\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 15109, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Samantha Burke\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 15110, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 15111, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 15112, "SQL": "select transaction_id from master_txn_table where customers = \"Steven Stewart\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 15113, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Anna Garza\" ) " }, { "id": 15114, "SQL": "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,\"Baby car seats\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 15115, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 15116, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 15117, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Sarah Fitzgerald\"" }, { "id": 15118, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brenda Austin\" ) " }, { "id": 15119, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 15120, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 15121, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Jeffrey Floyd\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) ) " }, { "id": 15122, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Victor Nguyen\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) )" }, { "id": 15123, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 15124, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Elizabeth Hamilton\" ) " }, { "id": 15125, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Amy Massey\" ) " }, { "id": 15126, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Danielle Bailey\" ) " }, { "id": 15127, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Edward Chavez\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 15128, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Christopher Walker\" ) " }, { "id": 15129, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Symphony performances\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 15130, "SQL": "select transaction_id from master_txn_table where customers = \"Erica Taylor\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 15131, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') group by billing_city" }, { "id": 15132, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 15133, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 15134, "SQL": "select avg(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 = \"Allison Hudson\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 15135, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Manufacturing eucalyptus oil\") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 15136, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 15137, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 15138, "SQL": "select sum(credit) from master_txn_table where product_service = \"License fees\" and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 15139, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Baby apparel and shoes\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 15140, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Zachary Russell\" ) " }, { "id": 15141, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Kathy Cole\" and account_type in ('Expense','Other Expense') and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 15142, "SQL": "select max(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 = \"Carolyn Hunter\" and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 15143, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Andrew Moore\" ) " }, { "id": 15144, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Eric Shaw\" ) " }, { "id": 15145, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 15146, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Peggy Diaz\" ) " }, { "id": 15147, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Heather Myers\" ) " }, { "id": 15148, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Darrell Flores\" order by transaction_date limit 1" }, { "id": 15149, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lauren Marquez\" ) " }, { "id": 15150, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Savings\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 15151, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Gary Martin\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 15152, "SQL": "select transaction_id from master_txn_table where customers = \"Dustin Gonzalez\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 15153, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jennifer Bennett\" and transaction_type = 'invoice'" }, { "id": 15154, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Justin Pena\" ) " }, { "id": 15155, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Tanya Strickland\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 15156, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 15157, "SQL": "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,\"Constructing multiunit special-needs complexes\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 15158, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 15159, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Mathew Jordan\"" }, { "id": 15160, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Karen Thomas\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 15161, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Photocopying\" " }, { "id": 15162, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 15163, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Amanda Santiago\" ) " }, { "id": 15164, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Workers Compensation\") and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 15165, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Elizabeth Ferguson\" and account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 15166, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Margaret Campbell' or vendor = 'Margaret Campbell'" }, { "id": 15167, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Valerie Cook\" ) " }, { "id": 15168, "SQL": "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,\"Savings\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 15169, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Computer Repair and Maintainenance\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 15170, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 15171, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') group by billing_city" }, { "id": 15172, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Amateur sports teams and club servcies\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 15173, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') order by sum(debit) desc limit 1" }, { "id": 15174, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ryan Morris\" ) " }, { "id": 15175, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Margaret Patterson\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 15176, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Meredith Williams\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 15177, "SQL": "select transaction_id from master_txn_table where customers = \"Eric Evans\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 15178, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jackie Pierce\" order by transaction_date limit 1" }, { "id": 15179, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Amy Fernandez MD\" ) " }, { "id": 15180, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Crystal Bautista\" ) " }, { "id": 15181, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Teresa Collier\" ) " }, { "id": 15182, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by billing_city" }, { "id": 15183, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Non-musical performances\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 15184, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Marc Lopez\" order by transaction_date limit 1" }, { "id": 15185, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Ann Faulkner\"" }, { "id": 15186, "SQL": "select max(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 = \"Jonathan Sanders\" and 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') " }, { "id": 15187, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Trevor Greene\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') )" }, { "id": 15188, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Nicholas Gibson\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) )" }, { "id": 15189, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Youth guidance\" " }, { "id": 15190, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 15191, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Quality management assessment\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 15192, "SQL": "select avg(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 = \"Jose Wilson\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 15193, "SQL": "select transaction_date from master_txn_table where customers = \"Rachel Carter\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 15194, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Michael Harrell\" ) " }, { "id": 15195, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 15196, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 15197, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Christopher Gill\" ) " }, { "id": 15198, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sean Becker\" ) " }, { "id": 15199, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"golf instruction services\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 15200, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Roger Vega\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 15201, "SQL": "select transaction_date from master_txn_table where customers = \"Sarah Wright\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 15202, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lisa Ford\" ) " }, { "id": 15203, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Angela Huff\" order by transaction_date limit 1" }, { "id": 15204, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Colleen Jacobson\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 15205, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Database management\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 15206, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Leah Miller\" ) " }, { "id": 15207, "SQL": "select transaction_date 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 = \"Social activities\" order by transaction_date asc limit 1 " }, { "id": 15208, "SQL": "select sum(credit) from master_txn_table where product_service = \"Non-nuclear\" and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 15209, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Manufacturing other Synthetic Oils\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 15210, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Caleb Valenzuela\" and transaction_type = 'invoice'" }, { "id": 15211, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') group by billing_city" }, { "id": 15212, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 15213, "SQL": "select sum(credit) from master_txn_table where product_service = \"attached and detached units\" and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 15214, "SQL": "select avg(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 = \"Brittany Roberts\" and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 15215, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Disposal Fees\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 15216, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Joseph Long\" ) " }, { "id": 15217, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 15218, "SQL": "select transaction_date from master_txn_table where customers = \"Thomas Riley\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 15219, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 15220, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 15221, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 15222, "SQL": "select sum(credit) from master_txn_table where product_service = \"Document Copying\" and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 15223, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') and account_type in ('Expense','Other Expense') " }, { "id": 15224, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 15225, "SQL": "select transaction_date 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 = \"Musical\" order by transaction_date asc limit 1 " }, { "id": 15226, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date) AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 15227, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Crystal Patel\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) ) " }, { "id": 15228, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Danielle Schwartz\" ) " }, { "id": 15229, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jared Turner\"" }, { "id": 15230, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 15231, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"John Greene\" ) " }, { "id": 15232, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Nicole Bell\" ) " }, { "id": 15233, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"John King\" ) " }, { "id": 15234, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 15235, "SQL": "select max(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 = \"Patricia Austin\" and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 15236, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 15237, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Farrier services\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 15238, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Construction management of multifamily building\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 15239, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 15240, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 15241, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Manufacturing industrial organic gases\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 15242, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Jeremy Wilson' or vendor = 'Jeremy Wilson'" }, { "id": 15243, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Michelle Powell\" order by transaction_date limit 1" }, { "id": 15244, "SQL": "select transaction_id from master_txn_table where customers = \"Robert Cochran\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 15245, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Data storage and management services\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 15246, "SQL": "select transaction_id from master_txn_table where customers = \"Paige Terrell\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 15247, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"John Bernard\" ) " }, { "id": 15248, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 15249, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jason Jennings\" order by transaction_date limit 1" }, { "id": 15250, "SQL": "select product_service, 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 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') group by product_service order by sum(credit) desc limit 1" }, { "id": 15251, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brett Davis\" ) " }, { "id": 15252, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"John Jones\"" }, { "id": 15253, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") group by product_service order by sum(credit) desc limit 1" }, { "id": 15254, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Heather Vang\" ) " }, { "id": 15255, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Mary Curtis\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 15256, "SQL": "select avg(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 = \"Amanda Rivera\" and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 15257, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Albert Murphy\" ) " }, { "id": 15258, "SQL": "select transaction_id from master_txn_table where product_service = \"Chimney sweep services\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 15259, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Providing freight car cleaning services\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 15260, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 15261, "SQL": "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,\"Attire and accessories\") and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 15262, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Kenneth Daniels\" order by transaction_date limit 1" }, { "id": 15263, "SQL": "select product_service, 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 transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') group by product_service order by sum(credit) desc limit 1" }, { "id": 15264, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 15265, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Athletic uniforms retailing\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 15266, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Lisa Delgado\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') ) " }, { "id": 15267, "SQL": "select min(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 = \"Michael Jacobs\" and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 15268, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 15269, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Megan Richards\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 15270, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 15271, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Stacy Rose\" order by transaction_date limit 1" }, { "id": 15272, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Mark Weber\" order by transaction_date limit 1" }, { "id": 15273, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Charles White\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 15274, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) group by billing_city" }, { "id": 15275, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 15276, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Loretta Garcia\" ) " }, { "id": 15277, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Jason Stewart\"" }, { "id": 15278, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Willie Anthony\" ) " }, { "id": 15279, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Ashley Carrillo\"" }, { "id": 15280, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Kathryn Griffin\" and transaction_type = 'invoice'" }, { "id": 15281, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Stephanie Parsons\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') ) " }, { "id": 15282, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Duct and gutter cleaning\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 15283, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Transportation services\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 15284, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Commodity Markets\" " }, { "id": 15285, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 15286, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 15287, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Data storage and management services\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 15288, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 15289, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Kimberly Lin\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 15290, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by billing_city" }, { "id": 15291, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 15292, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Patrick Salinas\" and transaction_type = 'invoice'" }, { "id": 15293, "SQL": "select min(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 = \"Peter Harrison\" and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 15294, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Jeremy Smith\" and transaction_type = 'payment' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') ) " }, { "id": 15295, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 15296, "SQL": "select transaction_date 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 = \"Equity long bias\" order by transaction_date asc limit 1 " }, { "id": 15297, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 15298, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 15299, "SQL": "select transaction_date from master_txn_table where customers = \"James Contreras\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 15300, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Grace Castro\" ) " }, { "id": 15301, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Alan Herring\" and transaction_type = 'invoice'" }, { "id": 15302, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Russell Combs\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 15303, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 15304, "SQL": "select transaction_id from master_txn_table where product_service = \"Saddlery\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 15305, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Samuel Dominguez' or vendor = 'Samuel Dominguez'" }, { "id": 15306, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Deborah Reyes\" ) " }, { "id": 15307, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Daniel Torres\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 15308, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Christine Nixon\"" }, { "id": 15309, "SQL": "select transaction_date from master_txn_table where customers = \"Dennis Brooks\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 15310, "SQL": "select transaction_date from master_txn_table where customers = \"Brandon Schmidt\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 15311, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Eric Campbell\" ) " }, { "id": 15312, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Richard Oneal\" order by transaction_date limit 1" }, { "id": 15313, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 15314, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jordan Torres\" and transaction_type = 'invoice'" }, { "id": 15315, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) group by billing_city" }, { "id": 15316, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Angel Beard\" ) " }, { "id": 15317, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 15318, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 15319, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Margaret Sanders\" ) " }, { "id": 15320, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kelly Parrish\" ) " }, { "id": 15321, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Yvonne Miller\" ) " }, { "id": 15322, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Donald Cooper\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) ) " }, { "id": 15323, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"James Conley\" ) " }, { "id": 15324, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 15325, "SQL": "select transaction_date from master_txn_table where customers = \"Deborah Adams\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 15326, "SQL": "select transaction_id from master_txn_table where customers = \"Willie Smith\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 15327, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 15328, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Livestock health services\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 15329, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Michael Roberts\"" }, { "id": 15330, "SQL": "select max(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 = \"Holly Thomas\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 15331, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 15332, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Connie Lopez' or vendor = 'Connie Lopez'" }, { "id": 15333, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Thomas George\"" }, { "id": 15334, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Patricia Bullock\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') )" }, { "id": 15335, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Derrick Perez\" ) " }, { "id": 15336, "SQL": "select transaction_date from master_txn_table where customers = \"Sarah Montgomery\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 15337, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Samuel Adams\"" }, { "id": 15338, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Mary Miller\" ) " }, { "id": 15339, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Charlotte Ward\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") ) " }, { "id": 15340, "SQL": "select min(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 = \"Chad Shields\" and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 15341, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Mathew Walsh\" ) " }, { "id": 15342, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 15343, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kimberly Glenn\" ) " }, { "id": 15344, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Geothermal-fueled power generation\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 15345, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Kimberly Schaefer\" order by transaction_date limit 1" }, { "id": 15346, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 15347, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 15348, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Joel King\" order by transaction_date limit 1" }, { "id": 15349, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Michael Carson\" ) " }, { "id": 15350, "SQL": "select avg(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 = \"Ana Sanchez\" and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 15351, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Aaron Reeves\" and account_type in ('Expense','Other Expense') and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 15352, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Scott Hodges\" order by transaction_date limit 1" }, { "id": 15353, "SQL": "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 citronella oil\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 15354, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Computer operation training\") 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') " }, { "id": 15355, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Opera performances\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 15356, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Motorbike \") and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 15357, "SQL": "select min(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 = \"David Acosta\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 15358, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ruben Ramirez\" ) " }, { "id": 15359, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Leah Peterson\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 15360, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by billing_city" }, { "id": 15361, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Amy Robinson\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 15362, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 15363, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 15364, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 15365, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Baby car seats\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 15366, "SQL": "select sum(credit) from master_txn_table where product_service = \"Software Training\" and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 15367, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Providing personal care\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 15368, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 15369, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Cameron Jones\"" }, { "id": 15370, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 15371, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Shannon Hines\"" }, { "id": 15372, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Jason Taylor\"" }, { "id": 15373, "SQL": "select transaction_date 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 = \"Food\" order by transaction_date asc limit 1 " }, { "id": 15374, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Brooke Moore\"" }, { "id": 15375, "SQL": "select max(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 = \"Amber Short\" and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 15376, "SQL": "select avg(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 = \"Nicholas Graham\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 15377, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Denise Eaton\" and transaction_type = 'invoice'" }, { "id": 15378, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Randall Martin\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) )" }, { "id": 15379, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Recognition software for healthcare\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 15380, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 15381, "SQL": "select transaction_id from master_txn_table where customers = \"Shirley Black\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 15382, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Andrew Foster\" ) " }, { "id": 15383, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Rebecca Peters\" ) " }, { "id": 15384, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 15385, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Retailing Chairs\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 15386, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Charles Holmes\"" }, { "id": 15387, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 15388, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Arthur Marsh\" order by transaction_date limit 1" }, { "id": 15389, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 15390, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 15391, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Youth community center services\") and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 15392, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jordan Johnson\" order by transaction_date limit 1" }, { "id": 15393, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounting\") and vendor = \"Elizabeth Zhang\"" }, { "id": 15394, "SQL": "select max(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 = \"Sydney Knox\" and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 15395, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Andrew Vargas\"" }, { "id": 15396, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Marc Spence\" and transaction_type = 'invoice'" }, { "id": 15397, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 15398, "SQL": "select sum(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Investment\" " }, { "id": 15399, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 15400, "SQL": "select transaction_date from master_txn_table where customers = \"Erin Garcia\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 15401, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 15402, "SQL": "select avg(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 = \"Glenda Sandoval\" and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 15403, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Scott Brennan\" ) " }, { "id": 15404, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Patty Shaw\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 15405, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Jessica Mcmillan DDS\"" }, { "id": 15406, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') and account_type in ('Expense','Other Expense') " }, { "id": 15407, "SQL": "select avg(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 = \"Rachel Munoz\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 15408, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Elizabeth Brown\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 15409, "SQL": "select transaction_date 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 = \"Toys\" order by transaction_date asc limit 1 " }, { "id": 15410, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Allison Diaz\"" }, { "id": 15411, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Providing dealing services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 15412, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Drew Pierce DVM\" ) " }, { "id": 15413, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Amy Harvey' or vendor = 'Amy Harvey'" }, { "id": 15414, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jennifer Walters DVM\" ) " }, { "id": 15415, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jordan Massey\" ) " }, { "id": 15416, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 15417, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jesse Thompson\" ) " }, { "id": 15418, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Morgan Carroll MD\" ) " }, { "id": 15419, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Mark Tucker\" ) " }, { "id": 15420, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Data storage management\" " }, { "id": 15421, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Carl Dunn\"" }, { "id": 15422, "SQL": "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,\"Occupational and vocational therapy\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 15423, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Daniel Harvey\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 15424, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 15425, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 15426, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 15427, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Joseph Mendoza\"" }, { "id": 15428, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Craig Le\" and transaction_type = 'invoice'" }, { "id": 15429, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Fishing\" " }, { "id": 15430, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Data storage management\" " }, { "id": 15431, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Courtney Thompson\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 15432, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Social activities\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 15433, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 15434, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Danielle Patterson\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 15435, "SQL": "select transaction_id from master_txn_table where product_service = \"Orange oil\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 15436, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 15437, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") group by product_service order by sum(credit) desc limit 1" }, { "id": 15438, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Lynn Hill\"" }, { "id": 15439, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 15440, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Rachel Cruz\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 15441, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Nancy Erickson\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 15442, "SQL": "select transaction_date 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 = \"Camping and Parking\" order by transaction_date asc limit 1 " }, { "id": 15443, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Care-planning\" " }, { "id": 15444, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Stacy Mcgrath\" ) " }, { "id": 15445, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 15446, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Denise Lopez\" ) " }, { "id": 15447, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Laura Holder\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 15448, "SQL": "select transaction_date 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 = \"Financial\" order by transaction_date asc limit 1 " }, { "id": 15449, "SQL": "select avg(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 = \"Julie Avila\" and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 15450, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') group by billing_city" }, { "id": 15451, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') group by billing_city" }, { "id": 15452, "SQL": "select sum(credit) from master_txn_table where product_service = \"Child guidance\" and 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') " }, { "id": 15453, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Nichole Carter\" ) " }, { "id": 15454, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"David Warren\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 15455, "SQL": "select transaction_date 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 = \"Tournaments and Matches\" order by transaction_date asc limit 1 " }, { "id": 15456, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") and account_type in ('Expense','Other Expense') " }, { "id": 15457, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 15458, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Alison Sanders\" ) " }, { "id": 15459, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Gregory Terry\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") )" }, { "id": 15460, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sharon Day\" ) " }, { "id": 15461, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Diving equipment retailing\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 15462, "SQL": "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,\"Constructing condominiums\") and 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') " }, { "id": 15463, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 15464, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") group by billing_city" }, { "id": 15465, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 15466, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Trust and Fiduciary\" " }, { "id": 15467, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ronald Weeks\" ) " }, { "id": 15468, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Gregory Burns\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) )" }, { "id": 15469, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Carrie Ross\" ) " }, { "id": 15470, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Heavy construction equipment rental\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 15471, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Selena Brown\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) )" }, { "id": 15472, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Gina Nichols\" order by transaction_date limit 1" }, { "id": 15473, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Howard Bennett\" ) " }, { "id": 15474, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 15475, "SQL": "select transaction_date 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 = \"Coffee and Snack\" order by transaction_date asc limit 1 " }, { "id": 15476, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 15477, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 15478, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Marvin Harper\" and transaction_type = 'invoice'" }, { "id": 15479, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 15480, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'John Simon' or vendor = 'John Simon'" }, { "id": 15481, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Wholesaling aircraft engines and parts\") and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 15482, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Stationery & Printing\") and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 15483, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Wholesaling aircraft\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 15484, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 15485, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Shearing services\") and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 15486, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 15487, "SQL": "select sum(credit) from master_txn_table where product_service = \"Metal ore\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 15488, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by billing_city" }, { "id": 15489, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Sheri Bentley\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 15490, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Melissa Morgan\" ) " }, { "id": 15491, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 15492, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Ashley Hawkins\" order by transaction_date limit 1" }, { "id": 15493, "SQL": "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,\"Bookkeeper\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 15494, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 15495, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Denise Hunt DDS\" ) " }, { "id": 15496, "SQL": "select transaction_date from master_txn_table where customers = \"Steven Black\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 15497, "SQL": "select sum(credit) from master_txn_table where product_service = \"Foster Care\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 15498, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Shearing services\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 15499, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 15500, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 15501, "SQL": "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,\"Care-planning services\") 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') " }, { "id": 15502, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 15503, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Purchases\") and vendor = \"Becky Jones\"" }, { "id": 15504, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Tiffany Richardson\" order by transaction_date limit 1" }, { "id": 15505, "SQL": "select transaction_date from master_txn_table where customers = \"Kirsten Harris\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 15506, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 15507, "SQL": "select sum(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Care-planning\" " }, { "id": 15508, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 15509, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Kimberly Barker\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 15510, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Martha Brooks\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) ) " }, { "id": 15511, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Manufacturing citronella oil\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 15512, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Meredith Walker\" ) " }, { "id": 15513, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Brent Mann\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 15514, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Musical performances\") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 15515, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 15516, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 15517, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Joshua Berger\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 15518, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Michael Diaz\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 15519, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Holly Glenn\" ) " }, { "id": 15520, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Lisa Ford\"" }, { "id": 15521, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 15522, "SQL": "select transaction_date 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 = \"Apparel and shoes\" order by transaction_date asc limit 1 " }, { "id": 15523, "SQL": "select transaction_id from master_txn_table where customers = \"Jorge Flowers\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 15524, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 15525, "SQL": "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,\"Nitrogen manufacturing\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 15526, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Daily living assistance\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 15527, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Susan Huber\" ) " }, { "id": 15528, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Rent or Lease\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 15529, "SQL": "select max(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 = \"Anthony Reynolds\" and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 15530, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 15531, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Matthew Dominguez' or vendor = 'Matthew Dominguez'" }, { "id": 15532, "SQL": "select transaction_date 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 = \"Tanker\" order by transaction_date asc limit 1 " }, { "id": 15533, "SQL": "select transaction_id from master_txn_table where customers = \"Caitlin Schwartz\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 15534, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Zachary Martin\" ) " }, { "id": 15535, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 15536, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 15537, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 15538, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Allen Moore\" ) " }, { "id": 15539, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Jennifer Harvey\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 15540, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Computer operation training\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 15541, "SQL": "select transaction_id from master_txn_table where customers = \"Timothy Gaines\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 15542, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 15543, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kathy Allen\" ) " }, { "id": 15544, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Erik Thornton\" ) " }, { "id": 15545, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 15546, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Copy centers\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 15547, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Janet Montgomery\" ) " }, { "id": 15548, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 15549, "SQL": "select sum(credit) from master_txn_table where product_service = \"Coal Pwer\" and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 15550, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Sherry Taylor\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') )" }, { "id": 15551, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Justin Brown\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 15552, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Daniel Cox' or vendor = 'Daniel Cox'" }, { "id": 15553, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") group by product_service order by sum(credit) desc limit 1" }, { "id": 15554, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 15555, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Ashlee Hansen\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 15556, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 15557, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Alexis Hardy\" ) " }, { "id": 15558, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Corey Bruce' or vendor = 'Corey Bruce'" }, { "id": 15559, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Christopher Decker\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 15560, "SQL": "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 = \"Gregory Good\" and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 15561, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Michelle Lozano\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 15562, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lisa Willis\" ) " }, { "id": 15563, "SQL": "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 grapefruit oil\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 15564, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Michael Dickson\"" }, { "id": 15565, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Dawn Davis\" ) " }, { "id": 15566, "SQL": "select transaction_date 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 = \"Waste-fueled\" order by transaction_date asc limit 1 " }, { "id": 15567, "SQL": "select transaction_date 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 = \"Railroad switching\" order by transaction_date asc limit 1 " }, { "id": 15568, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 15569, "SQL": "select transaction_id from master_txn_table where customers = \"Leslie Frederick\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 15570, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 15571, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Design and management services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 15572, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"John Morales\"" }, { "id": 15573, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 15574, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Child abuse prevention services\") and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 15575, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 15576, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 15577, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 15578, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Melissa Swanson\" ) " }, { "id": 15579, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Tonya Juarez\" ) " }, { "id": 15580, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 15581, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Michael Baker' or vendor = 'Michael Baker'" }, { "id": 15582, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 15583, "SQL": "select sum(credit) from master_txn_table where product_service = \"Railroad terminals\" and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 15584, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Tabitha Floyd\" ) " }, { "id": 15585, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Megan Adams\"" }, { "id": 15586, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 15587, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Manufacturing spearmint oil\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 15588, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jason Joseph\" ) " }, { "id": 15589, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Tara Lowe\" ) " }, { "id": 15590, "SQL": "select avg(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 = \"Natasha Davis\" and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 15591, "SQL": "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 citronella oil\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 15592, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Dustin Edwards\" ) " }, { "id": 15593, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Pamela Terry\"" }, { "id": 15594, "SQL": "select transaction_id from master_txn_table where customers = \"Cynthia Rios\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 15595, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 15596, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"William Powers\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 15597, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") order by sum(debit) desc limit 1" }, { "id": 15598, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Sandra Martinez\" order by transaction_date limit 1" }, { "id": 15599, "SQL": "select max(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 = \"Victor Ramirez\" and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 15600, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Kimberly Colon\" and transaction_type = 'invoice'" }, { "id": 15601, "SQL": "select transaction_id from master_txn_table where product_service = \"Physical Therapy\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 15602, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Eric Montgomery DVM\"" }, { "id": 15603, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Henry Crosby\" ) " }, { "id": 15604, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 15605, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 15606, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 15607, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Anna Lee\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) ) " }, { "id": 15608, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Pool maintenance\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 15609, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Patrick Gilbert\" ) " }, { "id": 15610, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') and account_type in ('Expense','Other Expense') " }, { "id": 15611, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Ashley Donaldson\" order by transaction_date limit 1" }, { "id": 15612, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by billing_city" }, { "id": 15613, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Amber Carter\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) )" }, { "id": 15614, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Breeding services\") and 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') " }, { "id": 15615, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jeffrey Thomas\" ) " }, { "id": 15616, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 15617, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Packing\" " }, { "id": 15618, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Development of software products for Tablets\") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 15619, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by billing_city" }, { "id": 15620, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Meghan Valentine\" ) " }, { "id": 15621, "SQL": "select product_service, 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 transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') group by product_service order by sum(credit) desc limit 1" }, { "id": 15622, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"James Ponce\" ) " }, { "id": 15623, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 15624, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kevin Gray\" ) " }, { "id": 15625, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Andrew Sloan\" ) " }, { "id": 15626, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounting\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 15627, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Cheryl Shepard\"" }, { "id": 15628, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Biogenic municipal waste-fueled power generation\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 15629, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Flowers\" " }, { "id": 15630, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Michael Roberts\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 15631, "SQL": "select transaction_id from master_txn_table where customers = \"Kevin Stewart\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 15632, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') group by billing_city" }, { "id": 15633, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Nicole Rocha\" ) " }, { "id": 15634, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 15635, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Benjamin Parker\" ) " }, { "id": 15636, "SQL": "select transaction_id from master_txn_table where customers = \"Kristy Holloway\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 15637, "SQL": "select transaction_id from master_txn_table where customers = \"Deborah Weiss\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 15638, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sandra Baird\" ) " }, { "id": 15639, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 15640, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Erin Kelly\" and transaction_type = 'invoice'" }, { "id": 15641, "SQL": "select transaction_id from master_txn_table where product_service = \"Therapy\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 15642, "SQL": "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,\"Database management\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 15643, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 15644, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Steven Floyd' or vendor = 'Steven Floyd'" }, { "id": 15645, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Catering services\") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 15646, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Dean Lee\" and transaction_type = 'invoice'" }, { "id": 15647, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Alison Brandt\" ) " }, { "id": 15648, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 15649, "SQL": "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,\"Development of software products for mobile devices\") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 15650, "SQL": "select transaction_id from master_txn_table where customers = \"Debra Arnold\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 15651, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') 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') order by sum(debit) desc limit 1" }, { "id": 15652, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Private mailbox rental centers\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 15653, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Manufacturing industrial inorganic gases\") and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 15654, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') and account_type in ('Expense','Other Expense') " }, { "id": 15655, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Martin Cummings\" ) " }, { "id": 15656, "SQL": "select transaction_date from master_txn_table where customers = \"Mary Reeves\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 15657, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Paula Todd\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) ) " }, { "id": 15658, "SQL": "select transaction_date 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 = \"Sleepers\" order by transaction_date asc limit 1 " }, { "id": 15659, "SQL": "select transaction_id from master_txn_table where product_service = \"Quality accreditation\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 15660, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 15661, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Thomas Chambers\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) )" }, { "id": 15662, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"William Craig\" ) " }, { "id": 15663, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Contracts\" " }, { "id": 15664, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 15665, "SQL": "select distinct transaction_id from master_txn_table where customers = \"James Jennings\"" }, { "id": 15666, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 15667, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Todd Welch\" order by transaction_date limit 1" }, { "id": 15668, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Anthony Duncan\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') ) " }, { "id": 15669, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Rachel Gaines\" ) " }, { "id": 15670, "SQL": "select min(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 = \"Janice Snow\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 15671, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Katherine Wagner\" ) " }, { "id": 15672, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 15673, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Michelle Dickerson\"" }, { "id": 15674, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Brooke Gonzalez\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 15675, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Susan Cherry\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 15676, "SQL": "select transaction_id from master_txn_table where product_service = \"Miscellaneous\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 15677, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 15678, "SQL": "select transaction_date 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 = \"Railroad terminals\" order by transaction_date asc limit 1 " }, { "id": 15679, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 15680, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jennifer Hogan\" ) " }, { "id": 15681, "SQL": "select sum(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Loading and unloading\" " }, { "id": 15682, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Basic office and secretarial skills training\") and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 15683, "SQL": "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 = \"Steven Joseph\" and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 15684, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Isaac Mitchell\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 15685, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Aircraft rental or leasing\") and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 15686, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 15687, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Emily Stuart\"" }, { "id": 15688, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Event-driven\" " }, { "id": 15689, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Rodney Harris' or vendor = 'Rodney Harris'" }, { "id": 15690, "SQL": "select transaction_date from master_txn_table where customers = \"Lisa Rush\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 15691, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Gregory Lee\" and transaction_type = 'payment' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') ) " }, { "id": 15692, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Charles Alexander\" ) " }, { "id": 15693, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Timothy Morse\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') ) " }, { "id": 15694, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Teresa Daniels\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") ) " }, { "id": 15695, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 15696, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Kelly Lara\" order by transaction_date limit 1" }, { "id": 15697, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 15698, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Joel Lee\" and transaction_type = 'invoice'" }, { "id": 15699, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Hotels and motel services\") and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 15700, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Earl Mcdonald\" order by transaction_date limit 1" }, { "id": 15701, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Casey Hill\"" }, { "id": 15702, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Elizabeth Rice\" and transaction_type = 'invoice'" }, { "id": 15703, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 15704, "SQL": "select transaction_id from master_txn_table where product_service = \"Mining machinery\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 15705, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Greg Cardenas\"" }, { "id": 15706, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Private parcel mailing services\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 15707, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 15708, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"David White\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 15709, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') order by sum(debit) desc limit 1" }, { "id": 15710, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kayla Burton\" ) " }, { "id": 15711, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jaime Benjamin\" ) " }, { "id": 15712, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Repair\" " }, { "id": 15713, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') order by sum(debit) desc limit 1" }, { "id": 15714, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 15715, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Baby clothing and footwear\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 15716, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Stationery & Printing\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 15717, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Leah Johnson\" ) " }, { "id": 15718, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 15719, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Carol Johnson\" ) " }, { "id": 15720, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 15721, "SQL": "select transaction_id from master_txn_table where product_service = \"Intravenous Therapy\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 15722, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jimmy Scott\" order by transaction_date limit 1" }, { "id": 15723, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Musicians\" " }, { "id": 15724, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Purchases\") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 15725, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Feasibility studies\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 15726, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 15727, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Erik Turner\" ) " }, { "id": 15728, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Diana Tate\" order by transaction_date limit 1" }, { "id": 15729, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 15730, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 15731, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jacob Long\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 15732, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Industrial manufacturing\") and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 15733, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Project assessments\" " }, { "id": 15734, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Amy Mckenzie' or vendor = 'Amy Mckenzie'" }, { "id": 15735, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 15736, "SQL": "select min(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 = \"Carrie Kelly\" and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 15737, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Steven Thompson\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 15738, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Pedro Strong\" order by transaction_date limit 1" }, { "id": 15739, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Dominique Ellis\" ) " }, { "id": 15740, "SQL": "select sum(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Commodity Markets\" " }, { "id": 15741, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jamie Warren\" ) " }, { "id": 15742, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Cassandra Willis\"" }, { "id": 15743, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Michael Li\" ) " }, { "id": 15744, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 15745, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"David Owen\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 15746, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Elizabeth Adams\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 15747, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 15748, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 15749, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Peter Gates\" ) " }, { "id": 15750, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Cory Stone\" ) " }, { "id": 15751, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Randy Bell\"" }, { "id": 15752, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 15753, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 15754, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Shaun Trujillo\" ) " }, { "id": 15755, "SQL": "select sum(credit) from master_txn_table where product_service = \"Photography\" and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 15756, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Kristina Norton' or vendor = 'Kristina Norton'" }, { "id": 15757, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Gas and Electric\") and vendor = \"Shawn Garza\"" }, { "id": 15758, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Mark Harvey\" and transaction_type = 'payment' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') )" }, { "id": 15759, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 15760, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 15761, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 15762, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Daniel Cook\" and transaction_type = 'invoice'" }, { "id": 15763, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 15764, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Angel Rodriguez\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) )" }, { "id": 15765, "SQL": "select transaction_date from master_txn_table where customers = \"Erica Wong\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 15766, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') 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') group by billing_city" }, { "id": 15767, "SQL": "select sum(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Oil field Machinery\" " }, { "id": 15768, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Sarah Foster\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 15769, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"James Vargas\" ) " }, { "id": 15770, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 15771, "SQL": "select min(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 = \"Ryan Clements\" and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 15772, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Dealing\" " }, { "id": 15773, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by billing_city" }, { "id": 15774, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Ashley Perez\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) ) " }, { "id": 15775, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 15776, "SQL": "select transaction_date from master_txn_table where customers = \"Erica Walter\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 15777, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 15778, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Derek Fuller\"" }, { "id": 15779, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 15780, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ashley Larson\" ) " }, { "id": 15781, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 15782, "SQL": "select transaction_date from master_txn_table where customers = \"Sonia Hanson\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 15783, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kyle Hamilton\" ) " }, { "id": 15784, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ronald Foley\" ) " }, { "id": 15785, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jonathan Wallace\" ) " }, { "id": 15786, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Jesse Frazier\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') ) " }, { "id": 15787, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Peter Ellis\" ) " }, { "id": 15788, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Manufacturing lemon oil\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 15789, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Melinda Bradley\" ) " }, { "id": 15790, "SQL": "select transaction_id from master_txn_table where customers = \"Jenna Khan\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 15791, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Robert Jordan\"" }, { "id": 15792, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Manufacturing other Synthetic Oils\") and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 15793, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"William Armstrong\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 15794, "SQL": "select transaction_date from master_txn_table where customers = \"Amanda Ford\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 15795, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Lisa Mitchell\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") ) " }, { "id": 15796, "SQL": "select max(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 = \"Linda Berry\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 15797, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 15798, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Gina Smith\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') ) " }, { "id": 15799, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Monica Wagner\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 15800, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"James Lynn\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 15801, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 15802, "SQL": "select max(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 = \"Krista Carpenter\" and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 15803, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) group by billing_city" }, { "id": 15804, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 15805, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 15806, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 15807, "SQL": "select product_service, 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 transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') group by product_service order by sum(credit) desc limit 1" }, { "id": 15808, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 15809, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lori Bell DDS\" ) " }, { "id": 15810, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Patricia Hernandez\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 15811, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Snow removal services\" " }, { "id": 15812, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Courtney Molina\" and transaction_type = 'payment' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') )" }, { "id": 15813, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jason Michael\" ) " }, { "id": 15814, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Richard Lopez\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) )" }, { "id": 15815, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Mike Byrd\" order by transaction_date limit 1" }, { "id": 15816, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 15817, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') order by sum(debit) desc limit 1" }, { "id": 15818, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Sharon Chavez' or vendor = 'Sharon Chavez'" }, { "id": 15819, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Dana Mcmillan\" ) " }, { "id": 15820, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kevin Rogers\" ) " }, { "id": 15821, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Lisa Mcfarland\" order by transaction_date limit 1" }, { "id": 15822, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 15823, "SQL": "select transaction_id from master_txn_table where customers = \"Kathleen Ball\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 15824, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Dylan Aguirre\" ) " }, { "id": 15825, "SQL": "select transaction_date 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 = \"Tournaments and Matches\" order by transaction_date asc limit 1 " }, { "id": 15826, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Kendra Turner\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 15827, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 15828, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 15829, "SQL": "select transaction_date 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 = \"Quality assessment\" order by transaction_date asc limit 1 " }, { "id": 15830, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Brittany Myers\"" }, { "id": 15831, "SQL": "select transaction_date from master_txn_table where customers = \"Tristan Hudson\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 15832, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Christine Miller\" ) " }, { "id": 15833, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Other construction activities\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 15834, "SQL": "select transaction_id from master_txn_table where product_service = \"Golf Courses\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 15835, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jessica Rios\" ) " }, { "id": 15836, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Wholesaling locomotives\") and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 15837, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Anne Stone\" ) " }, { "id": 15838, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Suzanne King\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') )" }, { "id": 15839, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Ralph Shaw\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) )" }, { "id": 15840, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 15841, "SQL": "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,\"Golf equipment and supply retailing\") and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 15842, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Matthew Solis\"" }, { "id": 15843, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Darren Taylor\" ) " }, { "id": 15844, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 15845, "SQL": "select transaction_date 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 = \"Motorbike\" order by transaction_date asc limit 1 " }, { "id": 15846, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Amy Paul\" order by transaction_date limit 1" }, { "id": 15847, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Mailbox Rental\" " }, { "id": 15848, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Breeding services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 15849, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 15850, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 15851, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 15852, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Todd Fernandez\" and transaction_type = 'payment' and 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') ) " }, { "id": 15853, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 15854, "SQL": "select min(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 = \"Brett Jones\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 15855, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Construction management of multifamily building\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 15856, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Erin Moody\" order by transaction_date limit 1" }, { "id": 15857, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 15858, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 15859, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Megan Ward\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 15860, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Cody Young\" ) " }, { "id": 15861, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Robin Woodard\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') ) " }, { "id": 15862, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Marcus Faulkner\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') )" }, { "id": 15863, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Kaitlin Atkinson\" and transaction_type = 'invoice'" }, { "id": 15864, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Brandon Gomez\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 15865, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') group by billing_city" }, { "id": 15866, "SQL": "select transaction_date from master_txn_table where customers = \"Jason Chapman\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 15867, "SQL": "select transaction_date from master_txn_table where customers = \"Annette Kline\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 15868, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Sherry Jones\"" }, { "id": 15869, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 15870, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Steven Thomas\" ) " }, { "id": 15871, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 15872, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 15873, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Brian Lamb\"" }, { "id": 15874, "SQL": "select min(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 = \"Angela Burke\" and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 15875, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Carl Crawford\" ) " }, { "id": 15876, "SQL": "select transaction_id from master_txn_table where product_service = \"License fees\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 15877, "SQL": "select min(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 = \"Linda Lewis\" and 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') " }, { "id": 15878, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Emma Adams\" ) " }, { "id": 15879, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Offering equity long bias\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 15880, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 15881, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Miss Pamela Johnston\" ) " }, { "id": 15882, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 15883, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 15884, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 15885, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Stephanie Kaufman\" order by transaction_date limit 1" }, { "id": 15886, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Richard Oneill\" ) " }, { "id": 15887, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jeffery Cook\" ) " }, { "id": 15888, "SQL": "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 = \"Justin Torres\" and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 15889, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kristy Mack\" ) " }, { "id": 15890, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") group by product_service order by sum(credit) desc limit 1" }, { "id": 15891, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Rickey Whitaker\" order by transaction_date limit 1" }, { "id": 15892, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Shelly Howard\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 15893, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 15894, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Steven Patterson\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') )" }, { "id": 15895, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Chad Holland' or vendor = 'Chad Holland'" }, { "id": 15896, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Carbon dioxide manufacturing\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 15897, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Aaron Hill\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 15898, "SQL": "select transaction_date from master_txn_table where customers = \"Debra Hamilton\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 15899, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Joseph Floyd\" and transaction_type = 'payment' 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') )" }, { "id": 15900, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Todd Beltran' or vendor = 'Todd Beltran'" }, { "id": 15901, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Marc Berger\" ) " }, { "id": 15902, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kimberly Rodriguez\" ) " }, { "id": 15903, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 15904, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 15905, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 15906, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Sandra Evans\" order by transaction_date limit 1" }, { "id": 15907, "SQL": "select transaction_date from master_txn_table where customers = \"Daniel Huffman\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 15908, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Tracy Mccormick\" ) " }, { "id": 15909, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Brandi Terry\"" }, { "id": 15910, "SQL": "select transaction_id from master_txn_table where customers = \"Lindsay Wood\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 15911, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Danielle Wilson\" and transaction_type = 'invoice'" }, { "id": 15912, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Drain cleaning\") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 15913, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 15914, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 15915, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Brandi Hale MD\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 15916, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Tammy Walker\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 15917, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 15918, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Anthony Yu\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 15919, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 15920, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 15921, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Michael Snyder\" ) " }, { "id": 15922, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Miranda Walker\" order by transaction_date limit 1" }, { "id": 15923, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 15924, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Constructing townhouses\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 15925, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 15926, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') and account_type in ('Expense','Other Expense') " }, { "id": 15927, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"James Jacobs\" ) " }, { "id": 15928, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ian Jimenez\" ) " }, { "id": 15929, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 15930, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Computer Repairs\") and vendor = \"Malik Byrd\"" }, { "id": 15931, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Victoria Stanley\"" }, { "id": 15932, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Bethany Rosario\"" }, { "id": 15933, "SQL": "select transaction_date from master_txn_table where customers = \"Renee Becker\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 15934, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Anthony Ramirez\" ) " }, { "id": 15935, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') and account_type in ('Expense','Other Expense') " }, { "id": 15936, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Robert Barajas\" and transaction_type = 'payment' and 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') ) " }, { "id": 15937, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 15938, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Carol Luna\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 15939, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Benjamin Whitney\" ) " }, { "id": 15940, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 15941, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Jessica Delgado\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 15942, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Gregory Snyder\" ) " }, { "id": 15943, "SQL": "select transaction_date 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 = \"Nonmetallic mineral ore\" order by transaction_date asc limit 1 " }, { "id": 15944, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Tanker rental or leasing\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 15945, "SQL": "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,\"Supplies\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 15946, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Emily Walker\" ) " }, { "id": 15947, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Thomas Robertson\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') ) " }, { "id": 15948, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by billing_city" }, { "id": 15949, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 15950, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 15951, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Uncategorized Income\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 15952, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") order by sum(debit) desc limit 1" }, { "id": 15953, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 15954, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 15955, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 15956, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Connor Watson\" ) " }, { "id": 15957, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Spraying services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 15958, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Claudia Taylor\" ) " }, { "id": 15959, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Anna Gonzalez\" ) " }, { "id": 15960, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Tracy Griffith\" order by transaction_date limit 1" }, { "id": 15961, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 15962, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ian Jimenez\" ) " }, { "id": 15963, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Shelley Duran\" ) " }, { "id": 15964, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Christopher Clements MD\" ) " }, { "id": 15965, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Gregory Winters\" ) " }, { "id": 15966, "SQL": "select transaction_date 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 = \"Aircraft\" order by transaction_date asc limit 1 " }, { "id": 15967, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 15968, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Rental Services\") and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 15969, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Nicholas Morton\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) )" }, { "id": 15970, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by billing_city" }, { "id": 15971, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Non-musical performances\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 15972, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jeanette Thomas\" order by transaction_date limit 1" }, { "id": 15973, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Maureen Everett\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 15974, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 15975, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Monica Day\" ) " }, { "id": 15976, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 15977, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Repair & Maintenance (deleted)\") and vendor = \"Jennifer Rodriguez\"" }, { "id": 15978, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Debra Hamilton' or vendor = 'Debra Hamilton'" }, { "id": 15979, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Christopher Conrad\"" }, { "id": 15980, "SQL": "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,\"Private parcel mailing services\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 15981, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Travel Meals\") 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') " }, { "id": 15982, "SQL": "select transaction_date 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 = \"Golf Instructions\" order by transaction_date asc limit 1 " }, { "id": 15983, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Tanya Simmons\"" }, { "id": 15984, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Amber Jones\" order by transaction_date limit 1" }, { "id": 15985, "SQL": "select transaction_date from master_txn_table where customers = \"Julie Buchanan\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 15986, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) group by billing_city" }, { "id": 15987, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"David Hernandez\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 15988, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Paige Webb' or vendor = 'Paige Webb'" }, { "id": 15989, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Christopher Duran\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 15990, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 15991, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 15992, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 15993, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Danielle Lee\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 15994, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Richard Herrera\"" }, { "id": 15995, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Joseph Jackson\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 15996, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 15997, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Curtis Walker\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) )" }, { "id": 15998, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Financial Planning\" " }, { "id": 15999, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 16000, "SQL": "select transaction_date from master_txn_table where customers = \"Vincent Moreno\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 16001, "SQL": "select sum(credit) from master_txn_table where product_service = \"--\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 16002, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Kenneth Larsen\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 16003, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jesse Porter\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 16004, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 16005, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Amy Howard\" and transaction_type = 'invoice'" }, { "id": 16006, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and 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') " }, { "id": 16007, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Cementing wells\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 16008, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 16009, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 16010, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Aaron Moore DVM\" ) " }, { "id": 16011, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Lindsay Flores\"" }, { "id": 16012, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Jessica Lee\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 16013, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Sarah Bautista\"" }, { "id": 16014, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Nicole Brown\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 16015, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"David Reed\" and transaction_type = 'invoice'" }, { "id": 16016, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 16017, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Arthur Bishop\"" }, { "id": 16018, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Earl Russo\"" }, { "id": 16019, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jason Campos\" and transaction_type = 'invoice'" }, { "id": 16020, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Other Services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 16021, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sharon Wood\" ) " }, { "id": 16022, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Fishing supply retailing\") and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 16023, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Wholesaling aircraft engines and parts\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 16024, "SQL": "select sum(credit) from master_txn_table where product_service = \"Securities\" and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 16025, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Equipment Repairs\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 16026, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 16027, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 16028, "SQL": "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,\"Railcar rental or leasing\") 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') " }, { "id": 16029, "SQL": "select transaction_id from master_txn_table where product_service = \"Providing other outdoor maintenance services\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 16030, "SQL": "select transaction_date 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 = \"Dietary and Nutritional\" order by transaction_date asc limit 1 " }, { "id": 16031, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Document Copying\" " }, { "id": 16032, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Donald Forbes\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 16033, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Daniel Mccormick\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) ) " }, { "id": 16034, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 16035, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sarah Cruz\" ) " }, { "id": 16036, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Amy Moore MD\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") ) " }, { "id": 16037, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") and account_type in ('Expense','Other Expense') " }, { "id": 16038, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Jessica Moore\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 16039, "SQL": "select min(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 = \"William Gordon\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 16040, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Kristi Ellis\"" }, { "id": 16041, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Grace Castro\" order by transaction_date limit 1" }, { "id": 16042, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Andrew Ritter\" ) " }, { "id": 16043, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 16044, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Suzanne King\" and transaction_type = 'invoice'" }, { "id": 16045, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Roy Davis\"" }, { "id": 16046, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Teresa Garcia\" ) " }, { "id": 16047, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Kimberly Saunders\" order by transaction_date limit 1" }, { "id": 16048, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') and account_type in ('Expense','Other Expense') " }, { "id": 16049, "SQL": "select sum(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Accessories\" " }, { "id": 16050, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Madison Sullivan\"" }, { "id": 16051, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Utilities\") and vendor = \"Diana King\"" }, { "id": 16052, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Saddlery\" " }, { "id": 16053, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') and account_type in ('Expense','Other Expense') " }, { "id": 16054, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 16055, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Timothy Ward\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 16056, "SQL": "select transaction_date from master_txn_table where customers = \"Hannah Anderson\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 16057, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") order by sum(debit) desc limit 1" }, { "id": 16058, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') group by product_service order by sum(credit) desc limit 1" }, { "id": 16059, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 16060, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Angelica Erickson\" order by transaction_date limit 1" }, { "id": 16061, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Recognition software for the auto sector\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 16062, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Gabriel Massey\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) ) " }, { "id": 16063, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Scott Klein\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 16064, "SQL": "select sum(credit) from master_txn_table where product_service = \"Service Provider\" and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 16065, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Richard Keller\" ) " }, { "id": 16066, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jacob Douglas\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 16067, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 16068, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Luke Thomas\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') )" }, { "id": 16069, "SQL": "select transaction_date from master_txn_table where customers = \"Carla Smith\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 16070, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Nancy Olson\" ) " }, { "id": 16071, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Justin Peters\" ) " }, { "id": 16072, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Christian Fernandez\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 16073, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ashley Walters\" ) " }, { "id": 16074, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Lisa Gates\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) ) " }, { "id": 16075, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Hydroelectric power generation\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 16076, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 16077, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 16078, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Patrick Phillips\" and transaction_type = 'payment' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') ) " }, { "id": 16079, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 16080, "SQL": "select transaction_date from master_txn_table where customers = \"Lisa Brooks\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 16081, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Constructing bangalow\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 16082, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Jonathan Lee\" and account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 16083, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Michael Lopez\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 16084, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Amy Moss\" ) " }, { "id": 16085, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Care-planning services\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 16086, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Christine Hampton\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 16087, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Angel Rodriguez\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) ) " }, { "id": 16088, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 16089, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Elizabeth Hill\" ) " }, { "id": 16090, "SQL": "select transaction_id from master_txn_table where product_service = \"Camping and Parking\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 16091, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Alicia Friedman\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) )" }, { "id": 16092, "SQL": "select sum(credit) from master_txn_table where product_service = \"Meal\" and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 16093, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 16094, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Daily living assistance\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 16095, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Tiffany Jimenez\"" }, { "id": 16096, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kim Harris\" ) " }, { "id": 16097, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sheila Shelton\" ) " }, { "id": 16098, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Leslie Jordan\" ) " }, { "id": 16099, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Transportation\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 16100, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kristine Perry\" ) " }, { "id": 16101, "SQL": "select transaction_date 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 field Machinery\" order by transaction_date asc limit 1 " }, { "id": 16102, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 16103, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"John Padilla\" order by transaction_date limit 1" }, { "id": 16104, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Boat, ship and steamship rental or leasing\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 16105, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Unapplied Cash Payment Income\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 16106, "SQL": "select transaction_id from master_txn_table where product_service = \"Apparel and shoes\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 16107, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 16108, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Travis Williams\" and account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 16109, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ashley Horton\" ) " }, { "id": 16110, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Stephanie Jensen\" ) " }, { "id": 16111, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Tracy Dominguez\"" }, { "id": 16112, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Eugene Burton\" ) " }, { "id": 16113, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Danny Gibson\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') )" }, { "id": 16114, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 16115, "SQL": "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 = \"Kathleen Mcgrath\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 16116, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"James Beard\" ) " }, { "id": 16117, "SQL": "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 railroad cars\") and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 16118, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Spraying services\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 16119, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 16120, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') group by billing_city" }, { "id": 16121, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 16122, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"John Stein\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 16123, "SQL": "select max(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 = \"Andrea Lawrence\" and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 16124, "SQL": "select transaction_id from master_txn_table where customers = \"Keith Young\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 16125, "SQL": "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 financial planning services\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 16126, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Equipment Rental\") and vendor = \"Bethany Sheppard\"" }, { "id": 16127, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 16128, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Jeremy Davis\"" }, { "id": 16129, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Eric Holt\" and transaction_type = 'invoice'" }, { "id": 16130, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Farrier services\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 16131, "SQL": "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,\"food and beverage services\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 16132, "SQL": "select sum(credit) from master_txn_table where product_service = \"Appearances and speeches\" and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 16133, "SQL": "select sum(credit) from master_txn_table where product_service = \"Tanker\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 16134, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 16135, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Building Repairs\") and vendor = \"Michelle Hernandez\"" }, { "id": 16136, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Joseph Robles\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') ) " }, { "id": 16137, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 16138, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Musicians\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 16139, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 16140, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Austin Harper\" order by transaction_date limit 1" }, { "id": 16141, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Michelle Pratt\" ) " }, { "id": 16142, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 16143, "SQL": "select transaction_date 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 = \"Musicians\" order by transaction_date asc limit 1 " }, { "id": 16144, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 16145, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 16146, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Uncategorized Income\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 16147, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Discounts given\") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 16148, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 16149, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 16150, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Sharon Oconnell\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') ) " }, { "id": 16151, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Francisco Li\" ) " }, { "id": 16152, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Michael Anderson\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 16153, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Catering services\") and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 16154, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Katie Richardson\" and transaction_type = 'invoice'" }, { "id": 16155, "SQL": "select max(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 = \"Austin Alvarez\" and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 16156, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Retailing formal dining furniture\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 16157, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Anthony Walker\" ) " }, { "id": 16158, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jodi Smith\" order by transaction_date limit 1" }, { "id": 16159, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 16160, "SQL": "select transaction_id from master_txn_table where customers = \"Emily Mitchell\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 16161, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") and account_type in ('Expense','Other Expense') " }, { "id": 16162, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 16163, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Sarah Mcdaniel\" order by transaction_date limit 1" }, { "id": 16164, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 16165, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Tim Knight\" ) " }, { "id": 16166, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Catherine Williams\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') )" }, { "id": 16167, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Kathryn Mosley\" order by transaction_date limit 1" }, { "id": 16168, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Diana King\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 16169, "SQL": "select transaction_date 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 = \"Breeding\" order by transaction_date asc limit 1 " }, { "id": 16170, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Patrick Petersen\" ) " }, { "id": 16171, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') group by billing_city" }, { "id": 16172, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Angela Hall\" ) " }, { "id": 16173, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date) AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 16174, "SQL": "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,\"Aircraft rental or leasing\") and 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') " }, { "id": 16175, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Retailing bedding\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 16176, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Golf Courses\" " }, { "id": 16177, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Leah Evans\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 16178, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Cameron Munoz\" ) " }, { "id": 16179, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Glenn Mendoza\" order by transaction_date limit 1" }, { "id": 16180, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Steven Hernandez\" order by transaction_date limit 1" }, { "id": 16181, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Christina Arias\" ) " }, { "id": 16182, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 16183, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Roger West\" ) " }, { "id": 16184, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 16185, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"John Sanchez\" and transaction_type = 'invoice'" }, { "id": 16186, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Patricia Roach\" ) " }, { "id": 16187, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Chairs\" " }, { "id": 16188, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Natalie Hawkins\"" }, { "id": 16189, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Campground and RV park services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 16190, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jasmine Middleton\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 16191, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Shawna King\" ) " }, { "id": 16192, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Rental Services\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 16193, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Ashley Anderson\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 16194, "SQL": "select transaction_date 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 = \"Home Therapy\" order by transaction_date asc limit 1 " }, { "id": 16195, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"William Scott\" ) " }, { "id": 16196, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Amanda Anthony' or vendor = 'Amanda Anthony'" }, { "id": 16197, "SQL": "select transaction_id from master_txn_table where product_service = \"Commodity Markets\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 16198, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Justin Carlson\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') )" }, { "id": 16199, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Nancy Kane' or vendor = 'Nancy Kane'" }, { "id": 16200, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Manufacturing eucalyptus oil\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 16201, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') group by product_service order by sum(credit) desc limit 1" }, { "id": 16202, "SQL": "select min(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 = \"John Walsh\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 16203, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Purchases\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 16204, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 16205, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name 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 account_type in ('Expense','Other Expense') " }, { "id": 16206, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Samantha Armstrong\"" }, { "id": 16207, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 16208, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date) AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 16209, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 16210, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Eric Patterson\" ) " }, { "id": 16211, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Maria Richardson\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 16212, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Popular music shows\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 16213, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Gloria Davidson\" ) " }, { "id": 16214, "SQL": "select transaction_date 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 = \"Rail support\" order by transaction_date asc limit 1 " }, { "id": 16215, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 16216, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 16217, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 16218, "SQL": "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 industrial organic gases\") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 16219, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 16220, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 16221, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Snow removal services\") and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 16222, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Vicki James\" and transaction_type = 'invoice'" }, { "id": 16223, "SQL": "select sum(credit) from master_txn_table where product_service = \"Photography\" and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 16224, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kara Pollard\" ) " }, { "id": 16225, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Adam Clark\" ) " }, { "id": 16226, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Equipment Rental\") and vendor = \"Bethany Sheppard\"" }, { "id": 16227, "SQL": "select max(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 = \"Rhonda Cooper\" and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 16228, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Heidi Schultz\" ) " }, { "id": 16229, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 16230, "SQL": "select transaction_date 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 = \"Biomass electricity\" order by transaction_date asc limit 1 " }, { "id": 16231, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jennifer Ferguson\" ) " }, { "id": 16232, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Caroline Lawson\" and transaction_type = 'invoice'" }, { "id": 16233, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 16234, "SQL": "select transaction_date from master_txn_table where customers = \"Bailey Hernandez\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 16235, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"License fees\") and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 16236, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Linda Watts\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) ) " }, { "id": 16237, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Diapers\" " }, { "id": 16238, "SQL": "select transaction_date from master_txn_table where customers = \"Angela Gibson\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 16239, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Transportation\") and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 16240, "SQL": "select transaction_id from master_txn_table where product_service = \"high-rise and low-rise buildings\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 16241, "SQL": "select transaction_id from master_txn_table where customers = \"Rachel Porter\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 16242, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Miranda Thompson' or vendor = 'Miranda Thompson'" }, { "id": 16243, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Sharon Moore\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 16244, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Child abuse prevention services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 16245, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 16246, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 16247, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 16248, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Saddlery retailing\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 16249, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Stacy Hood\" order by transaction_date limit 1" }, { "id": 16250, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Alexander Simmons\" ) " }, { "id": 16251, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Candice Pope\" ) " }, { "id": 16252, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Coffee and snack shops\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 16253, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Fees Billed\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 16254, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 16255, "SQL": "select transaction_date from master_txn_table where customers = \"Destiny Wood\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 16256, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Kelly Torres\" and transaction_type = 'payment' 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') ) " }, { "id": 16257, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Marcus Taylor\" ) " }, { "id": 16258, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Anna Powers\" and transaction_type = 'invoice'" }, { "id": 16259, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 16260, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Paul Coleman\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') )" }, { "id": 16261, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Erin Calhoun\" ) " }, { "id": 16262, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 16263, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 16264, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Susan Watts\"" }, { "id": 16265, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Dustin Archer\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 16266, "SQL": "select transaction_date from master_txn_table where customers = \"Gregory Mathews\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 16267, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 16268, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 16269, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Housing\" " }, { "id": 16270, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 16271, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Maintenance and Repairs\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 16272, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Wesley Bryant\"" }, { "id": 16273, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Jack Mathis' or vendor = 'Jack Mathis'" }, { "id": 16274, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Aaron Buchanan\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) ) " }, { "id": 16275, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Diane Goodwin\" ) " }, { "id": 16276, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"George Mejia\" order by transaction_date limit 1" }, { "id": 16277, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Nicole Davis\" and transaction_type = 'payment' and 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') )" }, { "id": 16278, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Jeremy Boyd\"" }, { "id": 16279, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 16280, "SQL": "select transaction_id from master_txn_table where product_service = \"Commodity Markets\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 16281, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') group by billing_city" }, { "id": 16282, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Benjamin Lee\" order by transaction_date limit 1" }, { "id": 16283, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Travis Jackson\" ) " }, { "id": 16284, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sarah Dean\" ) " }, { "id": 16285, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Miscellaneous services\") and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 16286, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 16287, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Valerie Harrell\" ) " }, { "id": 16288, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Providing railroad switching services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 16289, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Brian Davies\" order by transaction_date limit 1" }, { "id": 16290, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Robert Rodriguez\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 16291, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Edward Young\" ) " }, { "id": 16292, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") order by sum(debit) desc limit 1" }, { "id": 16293, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 16294, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Makayla Dixon\" ) " }, { "id": 16295, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Providing dealing services\") and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 16296, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 16297, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Offering event-driven funds\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 16298, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 16299, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Marc House\" ) " }, { "id": 16300, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Tabitha Pittman\" ) " }, { "id": 16301, "SQL": "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,\"Constructing condominiums\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 16302, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 16303, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Brandon Rodriguez\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 16304, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 16305, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 16306, "SQL": "select transaction_id from master_txn_table where product_service = \"Drinking and Special Food\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 16307, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 16308, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by billing_city" }, { "id": 16309, "SQL": "select transaction_id from master_txn_table where product_service = \"Renewable-fueled\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 16310, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Tara Lee MD\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 16311, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 16312, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 16313, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Richard Ward\"" }, { "id": 16314, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Samuel Calhoun\" ) " }, { "id": 16315, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') and account_type in ('Expense','Other Expense') " }, { "id": 16316, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where 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') and account_type in ('Expense','Other Expense') " }, { "id": 16317, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 16318, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Running, cutting and pulling casings, tubes and rods\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 16319, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Robert Carr\" ) " }, { "id": 16320, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Robin Copeland\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) ) " }, { "id": 16321, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Cameron Davidson\" ) " }, { "id": 16322, "SQL": "select transaction_date from master_txn_table where customers = \"Kristopher Burton\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 16323, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Coal Power generation\") and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 16324, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Alan Orozco\"" }, { "id": 16325, "SQL": "select transaction_date 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 = \"Breeding\" order by transaction_date asc limit 1 " }, { "id": 16326, "SQL": "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,\"Surveying wells\") and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 16327, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Paula Fuentes\" order by transaction_date limit 1" }, { "id": 16328, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 16329, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jacob Wright\" order by transaction_date limit 1" }, { "id": 16330, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"golf courses and country clubs\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 16331, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by billing_city" }, { "id": 16332, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Craig Anderson\"" }, { "id": 16333, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"John French\" order by transaction_date limit 1" }, { "id": 16334, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 16335, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Christian Ray\" ) " }, { "id": 16336, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Other Income\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 16337, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 16338, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 16339, "SQL": "select sum(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"License fees\" " }, { "id": 16340, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 16341, "SQL": "select transaction_date from master_txn_table where customers = \"Mary Wilson\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 16342, "SQL": "select transaction_id from master_txn_table where product_service = \"Care-planning\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 16343, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 16344, "SQL": "select sum(credit) from master_txn_table where product_service = \"Home care\" and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 16345, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Dawn Davidson\" order by transaction_date limit 1" }, { "id": 16346, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"William Bailey\"" }, { "id": 16347, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Amy Pineda\" ) " }, { "id": 16348, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 16349, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Vanessa White' or vendor = 'Vanessa White'" }, { "id": 16350, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Cindy Torres\" and transaction_type = 'invoice'" }, { "id": 16351, "SQL": "select max(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 = \"Daniel Phillips\" and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 16352, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 16353, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Sean Gray\"" }, { "id": 16354, "SQL": "select transaction_date from master_txn_table where customers = \"Angela Wright\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 16355, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Shannon Castillo\" and transaction_type = 'invoice'" }, { "id": 16356, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Susan Mooney\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 16357, "SQL": "select max(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 = \"Erika Barrett\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 16358, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 16359, "SQL": "select transaction_id from master_txn_table where product_service = \"Sleepers\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 16360, "SQL": "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,\"Rail transportation support and other products\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 16361, "SQL": "select transaction_date from master_txn_table where customers = \"Donna Wilson\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 16362, "SQL": "select max(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 = \"Misty Maddox\" and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 16363, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 16364, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 16365, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Trust and Fiduciary\" " }, { "id": 16366, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Gary Braun\" ) " }, { "id": 16367, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Mary Jackson' or vendor = 'Mary Jackson'" }, { "id": 16368, "SQL": "select sum(credit) from master_txn_table where product_service = \"Wells\" and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 16369, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Summer Hooper\" ) " }, { "id": 16370, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Labor\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 16371, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Development of other voice and speech recognition products\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 16372, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 16373, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Cheyenne Gonzalez\"" }, { "id": 16374, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Toni Cunningham\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 16375, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Tanya Strickland\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 16376, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Tina Willis\" order by transaction_date limit 1" }, { "id": 16377, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Anthony Cruz\" ) " }, { "id": 16378, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 16379, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jacob Porter\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 16380, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 16381, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"James Reid\" ) " }, { "id": 16382, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kathy Singleton\" ) " }, { "id": 16383, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Aaron Simpson\" ) " }, { "id": 16384, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Julia Zimmerman\" ) " }, { "id": 16385, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Shelby King\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 16386, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jeffery Hernandez\" ) " }, { "id": 16387, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Melanie Richardson\" ) " }, { "id": 16388, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 16389, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brandon Patel\" ) " }, { "id": 16390, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jorge Prince\"" }, { "id": 16391, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 16392, "SQL": "select sum(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Invitations\" " }, { "id": 16393, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Disposal Fees\") and vendor = \"Brandon Kim\"" }, { "id": 16394, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Thomas Bruce' or vendor = 'Thomas Bruce'" }, { "id": 16395, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Telephone\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 16396, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Cindy Cook\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 16397, "SQL": "select transaction_date from master_txn_table where customers = \"Isabel Wallace\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 16398, "SQL": "select transaction_date 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 = \"Investment\" order by transaction_date asc limit 1 " }, { "id": 16399, "SQL": "select transaction_date from master_txn_table where customers = \"Amy Foster\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 16400, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Eric Maldonado\" ) " }, { "id": 16401, "SQL": "select transaction_id from master_txn_table where customers = \"Anthony Richards\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 16402, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jessica Watson\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 16403, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Megan Lee\" ) " }, { "id": 16404, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 16405, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Natalie Arellano\"" }, { "id": 16406, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jesse Gregory\"" }, { "id": 16407, "SQL": "select transaction_date 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 = \"Social\" order by transaction_date asc limit 1 " }, { "id": 16408, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 16409, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Cassandra Willis\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 16410, "SQL": "select max(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 = \"Hannah Oconnell\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 16411, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 16412, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 16413, "SQL": "select transaction_date from master_txn_table where customers = \"Natalie Green\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 16414, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date) AND date(current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 16415, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 16416, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 16417, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 16418, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 16419, "SQL": "select transaction_id from master_txn_table where customers = \"Kimberly Bautista\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 16420, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') and account_type in ('Expense','Other Expense') " }, { "id": 16421, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jeremy Gamble\" ) " }, { "id": 16422, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Gas and Electric\") and vendor = \"Beth Morgan\"" }, { "id": 16423, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Running, cutting and pulling casings, tubes and rods\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 16424, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Helium\" " }, { "id": 16425, "SQL": "select sum(credit) from master_txn_table where product_service = \"Event-driven\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 16426, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 16427, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 16428, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 16429, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Antonio Sims\"" }, { "id": 16430, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Lori Petersen\"" }, { "id": 16431, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Maria Robertson' or vendor = 'Maria Robertson'" }, { "id": 16432, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 16433, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') group by billing_city" }, { "id": 16434, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Brittany Rhodes\"" }, { "id": 16435, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 16436, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"David Allen\"" }, { "id": 16437, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Erik Duarte\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) )" }, { "id": 16438, "SQL": "select sum(credit) from master_txn_table where product_service = \"Gifts and grants\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 16439, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jasmine Mann\" ) " }, { "id": 16440, "SQL": "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,\"Computer Repair and Maintainenance\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 16441, "SQL": "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,\"Taxes & Licenses\") and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 16442, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kevin Bailey\" ) " }, { "id": 16443, "SQL": "select transaction_date from master_txn_table where customers = \"James Bailey\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 16444, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Rachel Jordan\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 16445, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 16446, "SQL": "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,\"Meal services\") and 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') " }, { "id": 16447, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Heather Garcia\" and transaction_type = 'invoice'" }, { "id": 16448, "SQL": "select transaction_date from master_txn_table where customers = \"Kathleen Benjamin\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 16449, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Todd Wilkins\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) ) " }, { "id": 16450, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Benjamin Parker\"" }, { "id": 16451, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Zachary White\" ) " }, { "id": 16452, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Sandra Guerra\"" }, { "id": 16453, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Ethical Hacking Training\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 16454, "SQL": "select max(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 = \"Luis West\" and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 16455, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Kristy Cowan\"" }, { "id": 16456, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 16457, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Gregory Cox\" and transaction_type = 'invoice'" }, { "id": 16458, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Deborah Taylor\" and transaction_type = 'invoice'" }, { "id": 16459, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Equity long-only\" " }, { "id": 16460, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 16461, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') group by billing_city" }, { "id": 16462, "SQL": "select min(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 = \"Leonard Gonzalez\" and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 16463, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Alexis Allen\"" }, { "id": 16464, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 16465, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ashley Medina\" ) " }, { "id": 16466, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 16467, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Baby carriers\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 16468, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Gary Yu\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) )" }, { "id": 16469, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Brian Wood\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 16470, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Joe Miller\" and transaction_type = 'invoice'" }, { "id": 16471, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Rachel Bautista\" ) " }, { "id": 16472, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Carol Baxter\" ) " }, { "id": 16473, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 16474, "SQL": "select transaction_id from master_txn_table where product_service = \"Wind power\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 16475, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Providing grain leveling and trimming in railroad cars\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 16476, "SQL": "select transaction_id from master_txn_table where product_service = \"Rail support\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 16477, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Kimberly Evans\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 16478, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"John Harris\" ) " }, { "id": 16479, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Allen Fisher\"" }, { "id": 16480, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Tracey Baker\"" }, { "id": 16481, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Chase Livingston\" ) " }, { "id": 16482, "SQL": "select transaction_date from master_txn_table where customers = \"Leonard Dawson\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 16483, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 16484, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 16485, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 16486, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 16487, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"John Kane\" order by transaction_date limit 1" }, { "id": 16488, "SQL": "select transaction_date from master_txn_table where customers = \"Alexander Rodriguez\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 16489, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Coffee and Snack\" " }, { "id": 16490, "SQL": "select sum(credit) from master_txn_table where product_service = \"Fast food\" and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 16491, "SQL": "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 trust and fiduciary services\") and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 16492, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 16493, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 16494, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Symphony performances\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 16495, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 16496, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Dustin Irwin\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) ) " }, { "id": 16497, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Home therapy services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 16498, "SQL": "select transaction_id from master_txn_table where customers = \"Geoffrey Young\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 16499, "SQL": "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,\"Legal & Professional Fees\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 16500, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Scott Houston\" and transaction_type = 'invoice'" }, { "id": 16501, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Joshua Martin\" ) " }, { "id": 16502, "SQL": "select transaction_id from master_txn_table where product_service = \"Barge\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 16503, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 16504, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Youth community center services\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 16505, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Tammy Scott\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 16506, "SQL": "select product_service, 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 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') group by product_service order by sum(credit) desc limit 1" }, { "id": 16507, "SQL": "select min(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 = \"Ruben Acosta\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 16508, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Insurance\") and vendor = \"Gary Martin\"" }, { "id": 16509, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 16510, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Justin Schmidt\" ) " }, { "id": 16511, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jordan Newman\" ) " }, { "id": 16512, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Mallory Smith\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 16513, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"David Burke\"" }, { "id": 16514, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 16515, "SQL": "select transaction_date from master_txn_table where customers = \"Amanda Curtis\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 16516, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Adrian Scott\" ) " }, { "id": 16517, "SQL": "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,\"Social Service\") 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') " }, { "id": 16518, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 16519, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Emily Flowers\" and transaction_type = 'invoice'" }, { "id": 16520, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Joel Stanton\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 16521, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Carla Meyer\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) ) " }, { "id": 16522, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Kayla Avila\" and transaction_type = 'invoice'" }, { "id": 16523, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') group by product_service order by sum(credit) desc limit 1" }, { "id": 16524, "SQL": "select transaction_date 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 = \"Investment\" order by transaction_date asc limit 1 " }, { "id": 16525, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Anthony Holmes\" ) " }, { "id": 16526, "SQL": "select sum(credit) from master_txn_table where product_service = \"Application Hosting\" 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') " }, { "id": 16527, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brandon Clark\" ) " }, { "id": 16528, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 16529, "SQL": "select sum(credit) from master_txn_table where product_service = \"Quality assessment\" and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 16530, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Therapeutic services\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 16531, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 16532, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Abigail Mack\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 16533, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Rail transportation support and other products\") and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 16534, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Robert Villanueva\" ) " }, { "id": 16535, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Tyler Davis\" and transaction_type = 'invoice'" }, { "id": 16536, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Kevin Carter\" and transaction_type = 'payment' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') )" }, { "id": 16537, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Tyler Palmer\" order by transaction_date limit 1" }, { "id": 16538, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 16539, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 16540, "SQL": "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 = \"William Ramirez\" and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 16541, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Tammy Adams' or vendor = 'Tammy Adams'" }, { "id": 16542, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Michelle Hopkins\" order by transaction_date limit 1" }, { "id": 16543, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 16544, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Sue Roberts MD\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 16545, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Amber Herrera\" order by transaction_date limit 1" }, { "id": 16546, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Providing financial planning services\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 16547, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lauren Mitchell\" ) " }, { "id": 16548, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kimberly Goodwin\" ) " }, { "id": 16549, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date) AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 16550, "SQL": "select transaction_date from master_txn_table where customers = \"Zachary Hunter\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 16551, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') group by product_service order by sum(credit) desc limit 1" }, { "id": 16552, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Aaron Lee\" ) " }, { "id": 16553, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Promotional\") and vendor = \"Joy Carr\"" }, { "id": 16554, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Anthony Ford\"" }, { "id": 16555, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by billing_city" }, { "id": 16556, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Michael White DVM\" ) " }, { "id": 16557, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Brandon Gardner\" order by transaction_date limit 1" }, { "id": 16558, "SQL": "select transaction_date 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 = \"Boats\" order by transaction_date asc limit 1 " }, { "id": 16559, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Business process management\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 16560, "SQL": "select sum(credit) from master_txn_table where product_service = \"Data storage management\" and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 16561, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 16562, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Travel\") and vendor = \"Brian Hurley\"" }, { "id": 16563, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 16564, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Angela Gibbs\"" }, { "id": 16565, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Terry Jones\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 16566, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Gary Ward\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 16567, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sandra Wallace\" ) " }, { "id": 16568, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jacob Mason\" order by transaction_date limit 1" }, { "id": 16569, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 16570, "SQL": "select transaction_id from master_txn_table where product_service = \"Townhouses\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 16571, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date) AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 16572, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"James Weber\" ) " }, { "id": 16573, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Roberta Green\" order by transaction_date limit 1" }, { "id": 16574, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 16575, "SQL": "select sum(credit) from master_txn_table where product_service = \"Macro\" and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 16576, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 16577, "SQL": "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 engines and parts\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 16578, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Data storage management\" " }, { "id": 16579, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Allison Jackson\" ) " }, { "id": 16580, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Deborah Moody\"" }, { "id": 16581, "SQL": "select transaction_date from master_txn_table where customers = \"Jesse Blake\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 16582, "SQL": "select transaction_id from master_txn_table where product_service = \"Casings, Tubes and Rods\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 16583, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Rhonda Young\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 16584, "SQL": "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,\"Billable Expense Income\") 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') " }, { "id": 16585, "SQL": "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,\"Computer Repairs\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 16586, "SQL": "select transaction_date from master_txn_table where customers = \"Lisa Lin\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 16587, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 16588, "SQL": "select transaction_id from master_txn_table where product_service = \"Attire and accessories\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 16589, "SQL": "select transaction_id from master_txn_table where product_service = \"Citronella oil\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 16590, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Shelly Gonzales\" ) " }, { "id": 16591, "SQL": "select transaction_date 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 = \"Helium\" order by transaction_date asc limit 1 " }, { "id": 16592, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 16593, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 16594, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Natalie Francis\" ) " }, { "id": 16595, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Parker Mathews\" ) " }, { "id": 16596, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Joseph Miranda\" order by transaction_date limit 1" }, { "id": 16597, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Steve Fischer\" ) " }, { "id": 16598, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jesus Hess\" ) " }, { "id": 16599, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Dustin Snyder\" ) " }, { "id": 16600, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') group by billing_city" }, { "id": 16601, "SQL": "select transaction_id from master_txn_table where customers = \"Daniel Navarro\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 16602, "SQL": "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,\"Private parcel mailing services\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 16603, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sarah Roman\" ) " }, { "id": 16604, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Taylor Ward\"" }, { "id": 16605, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Mary Clark\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) ) " }, { "id": 16606, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Tonya Gentry\" and transaction_type = 'invoice'" }, { "id": 16607, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 16608, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 16609, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 16610, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Monique Hamilton\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 16611, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"General contracting\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 16612, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Laura Young\" and account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 16613, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Carbon dioxide manufacturing\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 16614, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jacqueline Smith\" ) " }, { "id": 16615, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 16616, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 16617, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 16618, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Kara Mcdaniel\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') )" }, { "id": 16619, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Mary Cunningham\" and transaction_type = 'invoice'" }, { "id": 16620, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Jesse Brock\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) ) " }, { "id": 16621, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Travis Brown\" ) " }, { "id": 16622, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Amanda Galloway\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') )" }, { "id": 16623, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 16624, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 16625, "SQL": "select transaction_id from master_txn_table where product_service = \"Railroad terminals\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 16626, "SQL": "select transaction_id from master_txn_table where product_service = \"Appearances and speeches\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 16627, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 16628, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 16629, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jacob Murphy\" order by transaction_date limit 1" }, { "id": 16630, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Cassandra Howard\" and transaction_type = 'invoice'" }, { "id": 16631, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 16632, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Commissions & fees\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 16633, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Travel\") and vendor = \"Frank Walker\"" }, { "id": 16634, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') group by billing_city" }, { "id": 16635, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Timothy Knapp\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 16636, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 16637, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Steven Thompson\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 16638, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Providing personal care\") and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 16639, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Uncategorized Expense\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 16640, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Child guidance services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 16641, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') order by sum(debit) desc limit 1" }, { "id": 16642, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 16643, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) group by billing_city" }, { "id": 16644, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Terry Lang\" ) " }, { "id": 16645, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) group by billing_city" }, { "id": 16646, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Unapplied Cash Bill Payment Expense\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 16647, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Antonio Rodriguez\" ) " }, { "id": 16648, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Thomas Walker\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 16649, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Tracy Jordan\" ) " }, { "id": 16650, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 16651, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 16652, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 16653, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Nursing and health services\") and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 16654, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Alex Bailey\" order by transaction_date limit 1" }, { "id": 16655, "SQL": "select transaction_id from master_txn_table where customers = \"Levi Griffin\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 16656, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Rebecca Aguirre\" ) " }, { "id": 16657, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Guy Rocha\" ) " }, { "id": 16658, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Jeremy Andrews\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 16659, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Stanley Lloyd\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 16660, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Monica Montes\" ) " }, { "id": 16661, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Phillip Torres\" ) " }, { "id": 16662, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Rail transportation support and other products\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 16663, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Sabrina Salazar\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') )" }, { "id": 16664, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Kevin Campbell\" order by transaction_date limit 1" }, { "id": 16665, "SQL": "select transaction_date from master_txn_table where customers = \"Robert Diaz\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 16666, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Crystal Barnett\" ) " }, { "id": 16667, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 16668, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Sarah Jacobs' or vendor = 'Sarah Jacobs'" }, { "id": 16669, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Beverly Parker\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 16670, "SQL": "select transaction_date from master_txn_table where customers = \"Richard Peterson\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 16671, "SQL": "select transaction_date 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 = \"Surveying wells\" order by transaction_date asc limit 1 " }, { "id": 16672, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Ventilation cleaning\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 16673, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jill Ortiz\" ) " }, { "id": 16674, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by billing_city" }, { "id": 16675, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Alicia Miller\" ) " }, { "id": 16676, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 16677, "SQL": "select transaction_id from master_txn_table where product_service = \"Repair\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 16678, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Tina Miller\"" }, { "id": 16679, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Robin Sanchez\" ) " }, { "id": 16680, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Artificial Intelligence Courses\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 16681, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Ashley Buchanan\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 16682, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jennifer Mcpherson\" ) " }, { "id": 16683, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Providing dealing services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 16684, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Jeremy Johnson' or vendor = 'Jeremy Johnson'" }, { "id": 16685, "SQL": "select transaction_date from master_txn_table where customers = \"Natalie Nicholson\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 16686, "SQL": "select transaction_date from master_txn_table where customers = \"Angela Davis MD\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 16687, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 16688, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 16689, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Gregory Johnson\" order by transaction_date limit 1" }, { "id": 16690, "SQL": "select transaction_id from master_txn_table where customers = \"Daniel Carson\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 16691, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 16692, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 16693, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 16694, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Taylor Dominguez\" ) " }, { "id": 16695, "SQL": "select transaction_id from master_txn_table where product_service = \"Bowling\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 16696, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 16697, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Wayne Duncan\"" }, { "id": 16698, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 16699, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 16700, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 16701, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Todd Rice\" ) " }, { "id": 16702, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Tyler Atkinson\" and transaction_type = 'payment' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') ) " }, { "id": 16703, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Thomas Stewart\" and transaction_type = 'invoice'" }, { "id": 16704, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jeffery Contreras\" ) " }, { "id": 16705, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Scott Davenport\" ) " }, { "id": 16706, "SQL": "select transaction_id from master_txn_table where customers = \"Elizabeth Hooper\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 16707, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 16708, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 16709, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 16710, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Constructing bangalow\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 16711, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') group by billing_city" }, { "id": 16712, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 16713, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Brenda Scott\"" }, { "id": 16714, "SQL": "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 locomotives\") and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 16715, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date) AND date(current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 16716, "SQL": "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,\"Legal & Professional Fees\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 16717, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Baby apparel and shoes\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 16718, "SQL": "select transaction_id from master_txn_table where customers = \"Johnny Nichols\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 16719, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Carbon dioxide manufacturing\") and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 16720, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Cody Mitchell\" ) " }, { "id": 16721, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Megan Ward\" and account_type in ('Expense','Other Expense') 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') " }, { "id": 16722, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 16723, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Stephen Rivera\" ) " }, { "id": 16724, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 16725, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Dylan Cook\" ) " }, { "id": 16726, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Brian Gray\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 16727, "SQL": "select transaction_id from master_txn_table where customers = \"Ashley Henderson\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 16728, "SQL": "select transaction_id from master_txn_table where customers = \"Lisa Welch\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 16729, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Andrew Weaver\" and transaction_type = 'invoice'" }, { "id": 16730, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 16731, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 16732, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"George Powers\"" }, { "id": 16733, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 16734, "SQL": "select transaction_id from master_txn_table where customers = \"Todd Brewer\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 16735, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 16736, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 16737, "SQL": "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,\"Spraying services\") and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 16738, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Patrick Myers\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') ) " }, { "id": 16739, "SQL": "select min(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 = \"Craig Hale\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 16740, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 16741, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 16742, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Diapers\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 16743, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Tammy Norman\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) ) " }, { "id": 16744, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kimberly Castaneda\" ) " }, { "id": 16745, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') group by billing_city" }, { "id": 16746, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Stephen Baker' or vendor = 'Stephen Baker'" }, { "id": 16747, "SQL": "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 lemon oil\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 16748, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Michelle Barnes\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 16749, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jessica Reynolds\" and transaction_type = 'invoice'" }, { "id": 16750, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Daniel Sutton\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) ) " }, { "id": 16751, "SQL": "select transaction_id from master_txn_table where customers = \"Mark Cervantes\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 16752, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 16753, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kathleen Wright\" ) " }, { "id": 16754, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 16755, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kevin Short\" ) " }, { "id": 16756, "SQL": "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,\"Computer Repair and Maintainenance\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 16757, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Johnny Knox\" and transaction_type = 'invoice'" }, { "id": 16758, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Alexandra Taylor\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 16759, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Bethany Lee\"" }, { "id": 16760, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Baby strollers\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 16761, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Miscellaneous services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 16762, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jonathan Suarez\" ) " }, { "id": 16763, "SQL": "select transaction_date from master_txn_table where customers = \"Alexis Scott\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 16764, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Malik Nguyen II\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 16765, "SQL": "select avg(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 = \"Allison White\" and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 16766, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Melissa Fitzgerald\" ) " }, { "id": 16767, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Tonya Morales\" ) " }, { "id": 16768, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Symphony performances\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 16769, "SQL": "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,\"Physical therapy\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 16770, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Johnny Oneal\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 16771, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 16772, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"golf courses and country clubs\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 16773, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Diana Walton\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) ) " }, { "id": 16774, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Shelly Frederick\" ) " }, { "id": 16775, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 16776, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 16777, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Oxygen manufacturing\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 16778, "SQL": "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,\"Barge rental or leasing\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 16779, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Sarah Hammond\" and transaction_type = 'invoice'" }, { "id": 16780, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Jennifer Rush\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 16781, "SQL": "select transaction_id from master_txn_table where product_service = \"Intravenous Therapy\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 16782, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Anna Carpenter\" and transaction_type = 'invoice'" }, { "id": 16783, "SQL": "select transaction_id from master_txn_table where product_service = \"Spearmint oil\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 16784, "SQL": "select sum(credit) from master_txn_table where product_service = \"Food & drink\" and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 16785, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Tamara Wood\" order by transaction_date limit 1" }, { "id": 16786, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Steve Porter\"" }, { "id": 16787, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Shane Cantu\"" }, { "id": 16788, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 16789, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 16790, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Tracy Johnson\" ) " }, { "id": 16791, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Insurance\") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 16792, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 16793, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Timothy French\"" }, { "id": 16794, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Joseph Dickerson\" ) " }, { "id": 16795, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Tina Richardson\" ) " }, { "id": 16796, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Anne Lawrence\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 16797, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Karen Alvarez\" ) " }, { "id": 16798, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') group by billing_city" }, { "id": 16799, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Exercise equipment retailing\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 16800, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Wind Power generation\") and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 16801, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Joseph Riley\" ) " }, { "id": 16802, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 16803, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lawrence Leonard\" ) " }, { "id": 16804, "SQL": "select transaction_date from master_txn_table where customers = \"Thomas Montgomery\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 16805, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') and account_type in ('Expense','Other Expense') " }, { "id": 16806, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 16807, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jennifer Carrillo\" ) " }, { "id": 16808, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jennifer Archer\"" }, { "id": 16809, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Derrick Hardin\" ) " }, { "id": 16810, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Paul Wong\" ) " }, { "id": 16811, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Jennifer Gordon\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 16812, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Douglas Lowe\" ) " }, { "id": 16813, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 16814, "SQL": "select transaction_date 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 = \"Barge\" order by transaction_date asc limit 1 " }, { "id": 16815, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 16816, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 16817, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 16818, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 16819, "SQL": "select transaction_date 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 = \"Memberships\" order by transaction_date asc limit 1 " }, { "id": 16820, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Rachel Levy\" order by transaction_date limit 1" }, { "id": 16821, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Private parcel mailing services\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 16822, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 16823, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Amber White\"" }, { "id": 16824, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brittney Huynh\" ) " }, { "id": 16825, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Towboat and tugboat rental or leasing\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 16826, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Occupational and vocational therapy\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 16827, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jaime Weber\"" }, { "id": 16828, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Wholesaling railroad equipment and supplies\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 16829, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 16830, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"John Howe\"" }, { "id": 16831, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Michelle Farmer\" ) " }, { "id": 16832, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Terri Jones\" order by transaction_date limit 1" }, { "id": 16833, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 16834, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Brent Mckinney\" and transaction_type = 'invoice'" }, { "id": 16835, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 16836, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Data storage and management services\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 16837, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 16838, "SQL": "select min(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 = \"Jacob Romero\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 16839, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Misty Dixon\" ) " }, { "id": 16840, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Steven Sexton\" and transaction_type = 'invoice'" }, { "id": 16841, "SQL": "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 = \"Gina Davis\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 16842, "SQL": "select sum(credit) from master_txn_table where product_service = \"Bars and Nightclubs\" and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 16843, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Kelsey Black\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") ) " }, { "id": 16844, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 16845, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Attire and accessories\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 16846, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Angela Huff\" ) " }, { "id": 16847, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Steven Silva\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 16848, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Sara Wilson\" order by transaction_date limit 1" }, { "id": 16849, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Daniel Wilson PhD\" order by transaction_date limit 1" }, { "id": 16850, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 16851, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and 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') order by sum(debit) desc limit 1" }, { "id": 16852, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Kyle Richardson\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") ) " }, { "id": 16853, "SQL": "select transaction_date 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 = \"Golf Equipment\" order by transaction_date asc limit 1 " }, { "id": 16854, "SQL": "select sum(credit) from master_txn_table where product_service = \"Home-care\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 16855, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 16856, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 16857, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) group by billing_city" }, { "id": 16858, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Christopher Baker\" and transaction_type = 'invoice'" }, { "id": 16859, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Valerie Swanson\" ) " }, { "id": 16860, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 16861, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 16862, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ryan Clay\" ) " }, { "id": 16863, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 16864, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Donna Durham\" ) " }, { "id": 16865, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Brandy Gates\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 16866, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 16867, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Stephen Thompson\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) )" }, { "id": 16868, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Kevin Joyce\"" }, { "id": 16869, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Offering fixed income funds\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 16870, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Nicholas Marshall\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") )" }, { "id": 16871, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Jennifer Henson\"" }, { "id": 16872, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Carbon dioxide manufacturing\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 16873, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Cheryl Robbins MD\" ) " }, { "id": 16874, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 16875, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 16876, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 16877, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Virginia Hoffman\"" }, { "id": 16878, "SQL": "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\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 16879, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Jeremy Kelley\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) )" }, { "id": 16880, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 16881, "SQL": "select transaction_date from master_txn_table where customers = \"Pam Andrade\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 16882, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Christina Warner\" ) " }, { "id": 16883, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Michelle Calderon\" ) " }, { "id": 16884, "SQL": "select transaction_id from master_txn_table where product_service = \"Tanker\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 16885, "SQL": "select transaction_date from master_txn_table where customers = \"Janet Hammond\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 16886, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Invitations\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 16887, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Photography\" " }, { "id": 16888, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 16889, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Audrey Shaw\" ) " }, { "id": 16890, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date) AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 16891, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jean Neal\" ) " }, { "id": 16892, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Retailing home office furniture\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 16893, "SQL": "select transaction_date 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 = \"Shipping\" order by transaction_date asc limit 1 " }, { "id": 16894, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 16895, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Michelle Bullock\" order by transaction_date limit 1" }, { "id": 16896, "SQL": "select transaction_id from master_txn_table where customers = \"Amy Smith\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 16897, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Malik Jackson\" ) " }, { "id": 16898, "SQL": "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,\"Recognition software for government and legal purposes\") and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 16899, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 16900, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Joseph Pugh\" ) " }, { "id": 16901, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 16902, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Brenda Bishop\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') ) " }, { "id": 16903, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 16904, "SQL": "select transaction_date 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 = \"Recreation\" order by transaction_date asc limit 1 " }, { "id": 16905, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 16906, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 16907, "SQL": "select transaction_date from master_txn_table where customers = \"Andrew Mitchell\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 16908, "SQL": "select transaction_id from master_txn_table where product_service = \"Wind power\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 16909, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Stephen Caldwell\" ) " }, { "id": 16910, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Katherine Burke\"" }, { "id": 16911, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 16912, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 16913, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Database management\" " }, { "id": 16914, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Donald Lewis\" ) " }, { "id": 16915, "SQL": "select max(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 = \"Victoria Maddox\" and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 16916, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 16917, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 16918, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Roger Evans\" order by transaction_date limit 1" }, { "id": 16919, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jody Li\" ) " }, { "id": 16920, "SQL": "select avg(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 = \"Devon Brooks\" and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 16921, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Adrian Campbell\" ) " }, { "id": 16922, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Michael Barnes\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 16923, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date) AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 16924, "SQL": "select transaction_id from master_txn_table where customers = \"Kaitlyn Reyes\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 16925, "SQL": "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,\"Construction management of multifamily building\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 16926, "SQL": "select transaction_date from master_txn_table where customers = \"Kelsey Sutton\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 16927, "SQL": "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 Income\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 16928, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 16929, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 16930, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 16931, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') 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') group by billing_city" }, { "id": 16932, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 16933, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Cost of Labor\") and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 16934, "SQL": "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,\"Retailing stationary sofas/sofa-sleepers\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 16935, "SQL": "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,\"Carbon dioxide manufacturing\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 16936, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 16937, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Peter Farrell\" and transaction_type = 'invoice'" }, { "id": 16938, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Seth Savage\" and transaction_type = 'invoice'" }, { "id": 16939, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 16940, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Danielle Rogers\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") ) " }, { "id": 16941, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Douglas Carey\" ) " }, { "id": 16942, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 16943, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date) AND date(current_date) group by billing_city" }, { "id": 16944, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Brandon Soto\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 16945, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Alicia Black\" ) " }, { "id": 16946, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Travel Meals\") and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 16947, "SQL": "select transaction_date 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 = \"Memberships\" order by transaction_date asc limit 1 " }, { "id": 16948, "SQL": "select transaction_id from master_txn_table where product_service = \"Helium\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 16949, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Dawn Booth\"" }, { "id": 16950, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Farrier services\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 16951, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Job Materials\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 16952, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Joy Cox\" ) " }, { "id": 16953, "SQL": "select transaction_id from master_txn_table where customers = \"Brian Cooke\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 16954, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Amber Flores\" ) " }, { "id": 16955, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 16956, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 16957, "SQL": "select sum(credit) from master_txn_table where product_service = \"Project assessments\" and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 16958, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Joshua Mercer\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 16959, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 16960, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Paula Ramirez\"" }, { "id": 16961, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Sean Pineda' or vendor = 'Sean Pineda'" }, { "id": 16962, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 16963, "SQL": "select transaction_date from master_txn_table where customers = \"Kylie Wheeler\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 16964, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 16965, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 16966, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Joel Lawson\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 16967, "SQL": "select transaction_id from master_txn_table where product_service = \"Home care\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 16968, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 16969, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Providing homemaker and companion services\") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 16970, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Evan Norris DDS\" ) " }, { "id": 16971, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 16972, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 16973, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Samuel Norman\" ) " }, { "id": 16974, "SQL": "select transaction_date from master_txn_table where customers = \"Randy Gonzalez\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 16975, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Michelle Merritt\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) ) " }, { "id": 16976, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 16977, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Corey Liu\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 16978, "SQL": "select sum(credit) from master_txn_table where product_service = \"Peppermint oil\" and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 16979, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 16980, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Care-planning services\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 16981, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 16982, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Cheryl White\"" }, { "id": 16983, "SQL": "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,\"Appearances and speeches\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 16984, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 16985, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ashley Henderson\" ) " }, { "id": 16986, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 16987, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Matthew Contreras\"" }, { "id": 16988, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Roger Bates\" ) " }, { "id": 16989, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Application service provisioning\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 16990, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') and account_type in ('Expense','Other Expense') " }, { "id": 16991, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Kayla York\" order by transaction_date limit 1" }, { "id": 16992, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Angela Berry\"" }, { "id": 16993, "SQL": "select transaction_date 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 = \"Foster Care\" order by transaction_date asc limit 1 " }, { "id": 16994, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 16995, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Meghan Howard\" ) " }, { "id": 16996, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Chase Jackson\"" }, { "id": 16997, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Well casings\" " }, { "id": 16998, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jeffrey Arroyo\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 16999, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sharon Williams\" ) " }, { "id": 17000, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 17001, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Monica King\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) )" }, { "id": 17002, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Kristen Sanchez\"" }, { "id": 17003, "SQL": "select transaction_date 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 = \"attached and detached units\" order by transaction_date asc limit 1 " }, { "id": 17004, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Kristen Martinez\" order by transaction_date limit 1" }, { "id": 17005, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 17006, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Emily Chang\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 17007, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Becky Fletcher\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 17008, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Taxes & Licenses\") and vendor = \"Caleb Simmons\"" }, { "id": 17009, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Stephen Fitzgerald\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 17010, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 17011, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Keith Guerra\" ) " }, { "id": 17012, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Joanne Mann\" ) " }, { "id": 17013, "SQL": "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,\"Industrial manufacturing\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 17014, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Alicia Barrera\" and transaction_type = 'payment' and 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') )" }, { "id": 17015, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Terry Mcdowell\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 17016, "SQL": "select sum(credit) from master_txn_table where product_service = \"Auto mobiles\" and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 17017, "SQL": "select transaction_date from master_txn_table where customers = \"Matthew Solis\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 17018, "SQL": "select transaction_date 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 = \"Food\" order by transaction_date asc limit 1 " }, { "id": 17019, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Matthew Rodriguez\" ) " }, { "id": 17020, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 17021, "SQL": "select transaction_date 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 = \"Hydroelectric electricity\" order by transaction_date asc limit 1 " }, { "id": 17022, "SQL": "select transaction_date 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 = \"Diapers\" order by transaction_date asc limit 1 " }, { "id": 17023, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Donald Forbes\"" }, { "id": 17024, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') 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') order by sum(debit) desc limit 1" }, { "id": 17025, "SQL": "select transaction_date 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 = \"Meals\" order by transaction_date asc limit 1 " }, { "id": 17026, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Adrian Mcdaniel\" ) " }, { "id": 17027, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 17028, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 17029, "SQL": "select sum(credit) from master_txn_table where product_service = \"Quality assessment\" and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 17030, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Sean Daniels\"" }, { "id": 17031, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 17032, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Christian Chapman\" ) " }, { "id": 17033, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Cindy Cooper\" ) " }, { "id": 17034, "SQL": "select sum(credit) from master_txn_table where product_service = \"Recreational programs\" and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 17035, "SQL": "select transaction_id from master_txn_table where customers = \"Bruce Jones\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 17036, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"William Mathews\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) ) " }, { "id": 17037, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 17038, "SQL": "select transaction_date from master_txn_table where customers = \"David Harvey\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 17039, "SQL": "select max(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 = \"Mitchell Thomas\" and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 17040, "SQL": "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,\"Golf equipment and supply retailing\") and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 17041, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Kyle Lopez\" and transaction_type = 'invoice'" }, { "id": 17042, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Diapers\") and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 17043, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Recognition software for government and legal purposes\") and 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') " }, { "id": 17044, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 17045, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Nathaniel Paul\" ) " }, { "id": 17046, "SQL": "select max(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 = \"Scott Jones\" and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 17047, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Fred Dennis\" and transaction_type = 'invoice'" }, { "id": 17048, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 17049, "SQL": "select transaction_date 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 = \"Business management\" order by transaction_date asc limit 1 " }, { "id": 17050, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Brittany Woods\"" }, { "id": 17051, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Wesley Walsh\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 17052, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Baby toys\") and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 17053, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Alexis Scott\" ) " }, { "id": 17054, "SQL": "select transaction_id from master_txn_table where customers = \"Ashley Mendoza\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 17055, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Data processing computer services\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 17056, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Rebecca Bailey' or vendor = 'Rebecca Bailey'" }, { "id": 17057, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Steve Smith\"" }, { "id": 17058, "SQL": "select transaction_id from master_txn_table where customers = \"Kristine Romero\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 17059, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 17060, "SQL": "select transaction_date 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 = \"Townhouses\" order by transaction_date asc limit 1 " }, { "id": 17061, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Lisa Owens\"" }, { "id": 17062, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 17063, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 17064, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"James Wallace\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 17065, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 17066, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Ricky Soto\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) )" }, { "id": 17067, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Development of software products for PCs\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 17068, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Recognition software for IT and telecommunications\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 17069, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Karen Adkins\" ) " }, { "id": 17070, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Office Expenses\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 17071, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Darlene Sanchez\" ) " }, { "id": 17072, "SQL": "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,\"Swimming pool Cleaning\") and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 17073, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 17074, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Shelly Potts MD\" and account_type in ('Expense','Other Expense') 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') " }, { "id": 17075, "SQL": "select transaction_date 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 = \"Recreational programs\" order by transaction_date asc limit 1 " }, { "id": 17076, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Michael Lane\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 17077, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 17078, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jacob Griffin\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 17079, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 17080, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Howard Rivas\" ) " }, { "id": 17081, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 17082, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Javier Brown\" and transaction_type = 'invoice'" }, { "id": 17083, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Peter Wells\"" }, { "id": 17084, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Christopher Jimenez\" ) " }, { "id": 17085, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Synthetic Oils\" " }, { "id": 17086, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Michael Lynn\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date) AND date(current_date) )" }, { "id": 17087, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by billing_city" }, { "id": 17088, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 17089, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Gina Warren\" ) " }, { "id": 17090, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Amy Moore MD\" ) " }, { "id": 17091, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 17092, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jason Ferguson\" ) " }, { "id": 17093, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Shannon Mills\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') ) " }, { "id": 17094, "SQL": "select min(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 = \"Jonathan Ferrell\" and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 17095, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) group by billing_city" }, { "id": 17096, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Computer Repairs\") and vendor = \"Linda Rice\"" }, { "id": 17097, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 17098, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Application hosting\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 17099, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') and account_type in ('Expense','Other Expense') " }, { "id": 17100, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') group by billing_city" }, { "id": 17101, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Christopher Dyer\" ) " }, { "id": 17102, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jason Mooney\" ) " }, { "id": 17103, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 17104, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Shelley Newman\" ) " }, { "id": 17105, "SQL": "select transaction_date from master_txn_table where customers = \"Patricia Vasquez\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 17106, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Teresa Espinoza\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 17107, "SQL": "select transaction_date 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 = \"Medication\" order by transaction_date asc limit 1 " }, { "id": 17108, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Bedding\" " }, { "id": 17109, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Howard Johnson\"" }, { "id": 17110, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Marissa Gomez\" ) " }, { "id": 17111, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 17112, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 17113, "SQL": "select transaction_id from master_txn_table where product_service = \"Dining\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 17114, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Aaron Murray\" ) " }, { "id": 17115, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 17116, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 17117, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Jeffrey Fitzpatrick\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 17118, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by billing_city" }, { "id": 17119, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date) AND date(current_date) group by billing_city" }, { "id": 17120, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Casey Carroll\" ) " }, { "id": 17121, "SQL": "select transaction_id from master_txn_table where product_service = \"Shearing\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 17122, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Other Income\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 17123, "SQL": "select transaction_id from master_txn_table where customers = \"Norman Hodge\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 17124, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Samantha Hodges' or vendor = 'Samantha Hodges'" }, { "id": 17125, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Baby clothing and footwear\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 17126, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Software Training\" " }, { "id": 17127, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 17128, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 17129, "SQL": "select transaction_id from master_txn_table where customers = \"Brandon Riggs\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 17130, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Larry Mcgee' or vendor = 'Larry Mcgee'" }, { "id": 17131, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jessica Walker\" ) " }, { "id": 17132, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Joshua Mercer\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 17133, "SQL": "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,\"Offering fixed income funds\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 17134, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Johnny Chan\" ) " }, { "id": 17135, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Wholesaling aircraft engines and parts\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 17136, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Christopher Walker' or vendor = 'Christopher Walker'" }, { "id": 17137, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Barry Luna\" ) " }, { "id": 17138, "SQL": "select transaction_date 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 = \"Towboat\" order by transaction_date asc limit 1 " }, { "id": 17139, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Toni Sanders\" order by transaction_date limit 1" }, { "id": 17140, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Building Repairs\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 17141, "SQL": "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,\"Billable Expense Income\") and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 17142, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Mary Cline\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 17143, "SQL": "select transaction_date from master_txn_table where customers = \"Edwin Owens\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 17144, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Patrick Parker DVM\" ) " }, { "id": 17145, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Other accommodation services\") and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 17146, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 17147, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 17148, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Michelle Bowen\" ) " }, { "id": 17149, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Cassandra Graham\" ) " }, { "id": 17150, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Mark Banks\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 17151, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Offering event-driven funds\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 17152, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 17153, "SQL": "select sum(credit) from master_txn_table where product_service = \"Postal\" and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 17154, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jasmin Brennan\" ) " }, { "id": 17155, "SQL": "select transaction_date from master_txn_table where customers = \"Crystal Bell\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 17156, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jeremiah George\" ) " }, { "id": 17157, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"golf instruction services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 17158, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 17159, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Travel Meals\") and vendor = \"Lisa Morris\"" }, { "id": 17160, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and 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') group by billing_city" }, { "id": 17161, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Other non-renewable power generation\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 17162, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Dana Thomas\" ) " }, { "id": 17163, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 17164, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Patrick Matthews\"" }, { "id": 17165, "SQL": "select max(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 = \"John Roth\" and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 17166, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sarah Clark\" ) " }, { "id": 17167, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 17168, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') group by billing_city" }, { "id": 17169, "SQL": "select transaction_date 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 = \"Contracts\" order by transaction_date asc limit 1 " }, { "id": 17170, "SQL": "select transaction_date from master_txn_table where customers = \"Howard Bennett\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 17171, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 17172, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Data processing computer services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 17173, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 17174, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Design and management services \") and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 17175, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') order by sum(debit) desc limit 1" }, { "id": 17176, "SQL": "select max(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 = \"Paul Jimenez\" and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 17177, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Mary Cross\" ) " }, { "id": 17178, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"John Stafford\" ) " }, { "id": 17179, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jill Liu\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 17180, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 17181, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Antonio Warner\" order by transaction_date limit 1" }, { "id": 17182, "SQL": "select transaction_date from master_txn_table where customers = \"Charles Moyer\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 17183, "SQL": "select transaction_id from master_txn_table where product_service = \"Financial Planning\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 17184, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Paige Delacruz\" ) " }, { "id": 17185, "SQL": "select avg(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 = \"Kyle Miller\" and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 17186, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Stacey Thomas\"" }, { "id": 17187, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Pamela Ramos\" ) " }, { "id": 17188, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 17189, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 17190, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jodi Collins\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 17191, "SQL": "select transaction_id from master_txn_table where customers = \"Richard Stone\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 17192, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Barbara Moss\" order by transaction_date limit 1" }, { "id": 17193, "SQL": "select min(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 = \"James Dean\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 17194, "SQL": "select transaction_id from master_txn_table where customers = \"Martin Dixon\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 17195, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Other renewable-fueled power generation\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 17196, "SQL": "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,\"Workers Compensation\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 17197, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Regina Young\" order by transaction_date limit 1" }, { "id": 17198, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Sandra Martinez\" order by transaction_date limit 1" }, { "id": 17199, "SQL": "select product_service, 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 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') group by product_service order by sum(credit) desc limit 1" }, { "id": 17200, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 17201, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Non-musical performances\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 17202, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") group by product_service order by sum(credit) desc limit 1" }, { "id": 17203, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Melanie Thompson\" order by transaction_date limit 1" }, { "id": 17204, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 17205, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Lauren Shelton\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 17206, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Tracy Fry\" ) " }, { "id": 17207, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 17208, "SQL": "select sum(credit) from master_txn_table where product_service = \"Financial\" and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 17209, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Rachel Bautista\" and transaction_type = 'payment' and 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') )" }, { "id": 17210, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and 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') " }, { "id": 17211, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Joseph Vance\" and transaction_type = 'invoice'" }, { "id": 17212, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Carl Williams\" ) " }, { "id": 17213, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Amy Allen\" ) " }, { "id": 17214, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Natasha Adkins\" ) " }, { "id": 17215, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Forestry Machinery\" " }, { "id": 17216, "SQL": "select transaction_id from master_txn_table where customers = \"Marcus Murphy\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 17217, "SQL": "select transaction_id from master_txn_table where customers = \"James Gibbs\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 17218, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Mary Thomas\"" }, { "id": 17219, "SQL": "select transaction_date 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 = \"Railroad terminals\" order by transaction_date asc limit 1 " }, { "id": 17220, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Robert Miller\"" }, { "id": 17221, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 17222, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Joshua Pitts\" ) " }, { "id": 17223, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 17224, "SQL": "select transaction_date 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 = \"Camping and Parking\" order by transaction_date asc limit 1 " }, { "id": 17225, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 17226, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kristina Price\" ) " }, { "id": 17227, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Alexa Spencer\"" }, { "id": 17228, "SQL": "select max(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 = \"Austin Harper\" and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 17229, "SQL": "select transaction_date 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 = \"Senior-care\" order by transaction_date asc limit 1 " }, { "id": 17230, "SQL": "select transaction_date from master_txn_table where customers = \"Veronica Gomez\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 17231, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Brian Lucas\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 17232, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Appearances and speeches\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 17233, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Morgan Richards' or vendor = 'Morgan Richards'" }, { "id": 17234, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 17235, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jonathan Harmon\" and transaction_type = 'invoice'" }, { "id": 17236, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Kevin Patterson\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 17237, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Rachel Moreno\" ) " }, { "id": 17238, "SQL": "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,\"Retailing Chairs\") and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 17239, "SQL": "select product_service, 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 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') group by product_service order by sum(credit) desc limit 1" }, { "id": 17240, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 17241, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 17242, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Home care\" " }, { "id": 17243, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Christopher Wood\" and account_type in ('Expense','Other Expense') and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 17244, "SQL": "select transaction_date 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 = \"Equity long-only\" order by transaction_date asc limit 1 " }, { "id": 17245, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name 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 account_type in ('Expense','Other Expense') " }, { "id": 17246, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sheila Bell\" ) " }, { "id": 17247, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jennifer Mckinney\" ) " }, { "id": 17248, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 17249, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Diana Lewis\" and transaction_type = 'payment' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') ) " }, { "id": 17250, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Susan Adams\" ) " }, { "id": 17251, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Megan Hunter\" ) " }, { "id": 17252, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sylvia Dunlap\" ) " }, { "id": 17253, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Frederick Oliver\" and transaction_type = 'invoice'" }, { "id": 17254, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 17255, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jennifer Snow\" ) " }, { "id": 17256, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Equipment Rental\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 17257, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 17258, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jonathan Flowers\" ) " }, { "id": 17259, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') group by billing_city" }, { "id": 17260, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 17261, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Snow removal services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 17262, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Robert Mckenzie\" ) " }, { "id": 17263, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') order by sum(debit) desc limit 1" }, { "id": 17264, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and 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') " }, { "id": 17265, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Memberships\") 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') " }, { "id": 17266, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Madison Martinez\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 17267, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Janice Lopez\"" }, { "id": 17268, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Deanna Aguirre\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date) AND date(current_date) ) " }, { "id": 17269, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Michele Hawkins\" and transaction_type = 'invoice'" }, { "id": 17270, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lisa Johnson\" ) " }, { "id": 17271, "SQL": "select transaction_id from master_txn_table where customers = \"Kenneth Young\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 17272, "SQL": "select transaction_date from master_txn_table where customers = \"Alisha Schmitt\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 17273, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Katherine Robinson\" ) " }, { "id": 17274, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 17275, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ryan Brown\" ) " }, { "id": 17276, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Tina Andersen\"" }, { "id": 17277, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Cost of Labor\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 17278, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') 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') group by billing_city" }, { "id": 17279, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 17280, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Quality management assessment\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 17281, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by billing_city" }, { "id": 17282, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 17283, "SQL": "select product_service, 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 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') group by product_service order by sum(credit) desc limit 1" }, { "id": 17284, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Cheryl King\" and transaction_type = 'invoice'" }, { "id": 17285, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Rita Morales\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 17286, "SQL": "select transaction_date from master_txn_table where customers = \"Peter Howard\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 17287, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Shane Mccarthy\" ) " }, { "id": 17288, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Whitney Gordon\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 17289, "SQL": "select avg(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 = \"Austin Nolan\" and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 17290, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Joseph Brown\" ) " }, { "id": 17291, "SQL": "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,\"golf equipment rental services\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 17292, "SQL": "select transaction_id from master_txn_table where customers = \"Natasha Li\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 17293, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Travis Hogan\" ) " }, { "id": 17294, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Richard Snyder\" order by transaction_date limit 1" }, { "id": 17295, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 17296, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Baby furniture\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 17297, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 17298, "SQL": "select transaction_date from master_txn_table where customers = \"Leslie King\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 17299, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Job Expenses\") and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 17300, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Dean Nichols\" ) " }, { "id": 17301, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Kimberly Williams\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 17302, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Krystal Ramos\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') ) " }, { "id": 17303, "SQL": "select sum(credit) from master_txn_table where product_service = \"Event-driven\" and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 17304, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Debra Riley' or vendor = 'Debra Riley'" }, { "id": 17305, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Karen Barry\" ) " }, { "id": 17306, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jerry Walters\" ) " }, { "id": 17307, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Veronica Morris\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 17308, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Ashlee Thomas\" order by transaction_date limit 1" }, { "id": 17309, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 17310, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kimberly Mcgrath\" ) " }, { "id": 17311, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 17312, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Offering equity market neutral funds\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 17313, "SQL": "select max(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 = \"Zachary Mooney\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 17314, "SQL": "select transaction_date 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 = \"Distressed Securities\" order by transaction_date asc limit 1 " }, { "id": 17315, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"William Frazier\" ) " }, { "id": 17316, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Other Services\") and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 17317, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Baby toys\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 17318, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") and account_type in ('Expense','Other Expense') " }, { "id": 17319, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Troy Johnson\" ) " }, { "id": 17320, "SQL": "select sum(credit) from master_txn_table where product_service = \"Breeding\" and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 17321, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 17322, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 17323, "SQL": "select max(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 = \"Brittany Frazier\" and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 17324, "SQL": "select transaction_id from master_txn_table where product_service = \"Railroad Equipment\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 17325, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Alicia Cruz\" order by transaction_date limit 1" }, { "id": 17326, "SQL": "select transaction_date from master_txn_table where customers = \"Joseph Bentley\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 17327, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"William Payne\" and transaction_type = 'invoice'" }, { "id": 17328, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') group by billing_city" }, { "id": 17329, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Rhonda Johnson\" ) " }, { "id": 17330, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jill Mccoy MD\" ) " }, { "id": 17331, "SQL": "select transaction_date from master_txn_table where customers = \"Arthur Hood\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 17332, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jeanette Lindsey\" ) " }, { "id": 17333, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' 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') " }, { "id": 17334, "SQL": "select transaction_date from master_txn_table where customers = \"Sandra Jackson\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 17335, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Paula Steele\" and transaction_type = 'payment' 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') ) " }, { "id": 17336, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') group by billing_city" }, { "id": 17337, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 17338, "SQL": "select product_service, 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 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') group by product_service order by sum(credit) desc limit 1" }, { "id": 17339, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Diapers\") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 17340, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Alejandra Flores\"" }, { "id": 17341, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Shearing services\") and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 17342, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Bryan Robbins\" ) " }, { "id": 17343, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Greg Cardenas\" and transaction_type = 'invoice'" }, { "id": 17344, "SQL": "select transaction_id from master_txn_table where customers = \"Mary Johnson\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 17345, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 17346, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sally Merritt\" ) " }, { "id": 17347, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Patrick Jones\"" }, { "id": 17348, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Steven Butler\" ) " }, { "id": 17349, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Jennifer Gordon\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 17350, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 17351, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 17352, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Katherine Savage\" ) " }, { "id": 17353, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Window washing\") and 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') " }, { "id": 17354, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Emily Luna\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) )" }, { "id": 17355, "SQL": "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,\"Daily living assistance\") and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 17356, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 17357, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Diana Willis\" ) " }, { "id": 17358, "SQL": "select transaction_date 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 = \"Event-driven\" order by transaction_date asc limit 1 " }, { "id": 17359, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Courtney Monroe\"" }, { "id": 17360, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 17361, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Alicia Chambers\" and transaction_type = 'payment' and 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') ) " }, { "id": 17362, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Julia Haney\" ) " }, { "id": 17363, "SQL": "select transaction_date from master_txn_table where customers = \"Eric Reid\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 17364, "SQL": "select transaction_id from master_txn_table where customers = \"Jasmine Schaefer\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 17365, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Manufacturing eucalyptus oil\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 17366, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Spraying services\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 17367, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 17368, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Garrett Hood\" ) " }, { "id": 17369, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Mining machinery and equipment rental or leasing\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 17370, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Data processing\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 17371, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by billing_city" }, { "id": 17372, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Colin Cooley' or vendor = 'Colin Cooley'" }, { "id": 17373, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Maria Holt\" ) " }, { "id": 17374, "SQL": "select transaction_date from master_txn_table where customers = \"Angela Carter\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 17375, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 17376, "SQL": "select transaction_date 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 = \"Surveying wells\" order by transaction_date asc limit 1 " }, { "id": 17377, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Manufacturing grapefruit oil\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 17378, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 17379, "SQL": "select sum(credit) from master_txn_table where product_service = \"Intravenous Therapy\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 17380, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 17381, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 17382, "SQL": "select transaction_date from master_txn_table where customers = \"Mary Cabrera\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 17383, "SQL": "select transaction_date from master_txn_table where customers = \"Rachael Ortega\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 17384, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 17385, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 17386, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 17387, "SQL": "select transaction_date from master_txn_table where customers = \"Geoffrey Dunn\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 17388, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Thomas Mays\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) ) " }, { "id": 17389, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Melvin Burns\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date) AND date(current_date) )" }, { "id": 17390, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Terri Allison\" ) " }, { "id": 17391, "SQL": "select transaction_date 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 = \"Data processing\" order by transaction_date asc limit 1 " }, { "id": 17392, "SQL": "select transaction_id from master_txn_table where customers = \"Sheila Graves\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 17393, "SQL": "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,\"Full-service restaurants\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 17394, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 17395, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kerri Wood\" ) " }, { "id": 17396, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Frank Olson\" ) " }, { "id": 17397, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Non-musical performances\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 17398, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 17399, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Melissa Blair\" ) " }, { "id": 17400, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Erica Randall\" order by transaction_date limit 1" }, { "id": 17401, "SQL": "select min(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 = \"Adrienne Luna\" and 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') " }, { "id": 17402, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 17403, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 17404, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 17405, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Nicholas Perez\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 17406, "SQL": "select transaction_date from master_txn_table where customers = \"Robert Ray\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 17407, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 17408, "SQL": "select transaction_date from master_txn_table where customers = \"Haley Peck\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 17409, "SQL": "select sum(credit) from master_txn_table where product_service = \"Mailbox Services\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 17410, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Joshua Ruiz\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) )" }, { "id": 17411, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') order by sum(debit) desc limit 1" }, { "id": 17412, "SQL": "select avg(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 = \"James Floyd\" 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') " }, { "id": 17413, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') 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') group by billing_city" }, { "id": 17414, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Fishing supply retailing\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 17415, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Joshua Alexander\" order by transaction_date limit 1" }, { "id": 17416, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 17417, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Frederick Hodges\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') ) " }, { "id": 17418, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Vanessa Davila\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') )" }, { "id": 17419, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Home therapy services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 17420, "SQL": "select max(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 = \"Ann Miller\" and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 17421, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Andrew Salinas\" and transaction_type = 'invoice'" }, { "id": 17422, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 17423, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') 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') order by sum(debit) desc limit 1" }, { "id": 17424, "SQL": "select transaction_date from master_txn_table where customers = \"Gary Wilkins\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 17425, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Mary Williams\" order by transaction_date limit 1" }, { "id": 17426, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Shannon Jimenez\" ) " }, { "id": 17427, "SQL": "select transaction_date from master_txn_table where customers = \"Carla Thompson\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 17428, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Zachary Wright\" and transaction_type = 'invoice'" }, { "id": 17429, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Dillon Jones\"" }, { "id": 17430, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Offering equity market neutral funds\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 17431, "SQL": "select transaction_id from master_txn_table where product_service = \"Brokerage\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 17432, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Brokerage\" " }, { "id": 17433, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 17434, "SQL": "select sum(credit) from master_txn_table where product_service = \"Abandoned Infant\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 17435, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Social Service\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 17436, "SQL": "select avg(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 = \"Paul Patterson\" and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 17437, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Home care\" " }, { "id": 17438, "SQL": "select transaction_id from master_txn_table where product_service = \"Repair\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 17439, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Tiffany Sanford\" order by transaction_date limit 1" }, { "id": 17440, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Tina Phillips\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 17441, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Anthony Horton\"" }, { "id": 17442, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 17443, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Application service provider services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 17444, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 17445, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Emily Lee\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 17446, "SQL": "select transaction_date 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 = \"Nursing and health\" order by transaction_date asc limit 1 " }, { "id": 17447, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 17448, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Cost of Labor\") and vendor = \"Michael Gonzalez\"" }, { "id": 17449, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Laura Kennedy\" and transaction_type = 'payment' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') ) " }, { "id": 17450, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Providing support for money investment securities\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 17451, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 17452, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 17453, "SQL": "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,\"Accounts Receivable (A/R)\") 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') " }, { "id": 17454, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Wholesaling aircraft\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 17455, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"David Pruitt\" ) " }, { "id": 17456, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Lee Maxwell\"" }, { "id": 17457, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Emily Chang\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 17458, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Donna Gonzalez\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 17459, "SQL": "select transaction_date 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 = \"Packaging and labeling\" order by transaction_date asc limit 1 " }, { "id": 17460, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jamie Smith\" order by transaction_date limit 1" }, { "id": 17461, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Amy Robinson\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 17462, "SQL": "select transaction_date 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 = \"Government Purposes\" order by transaction_date asc limit 1 " }, { "id": 17463, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Kristin Kelly\" order by transaction_date limit 1" }, { "id": 17464, "SQL": "select distinct transaction_id from master_txn_table where customers = \"James Cooke\"" }, { "id": 17465, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Patrick Hall\" and transaction_type = 'invoice'" }, { "id": 17466, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 17467, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 17468, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Keith Carr\" ) " }, { "id": 17469, "SQL": "select min(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 = \"Isaiah Fox\" 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') " }, { "id": 17470, "SQL": "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 = \"Amanda Duffy\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 17471, "SQL": "select max(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 = \"David Carroll\" and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 17472, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 17473, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Larry Brown\" ) " }, { "id": 17474, "SQL": "select sum(credit) from master_txn_table where product_service = \"Dining\" and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 17475, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Brian Murphy\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 17476, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sherry Sexton\" ) " }, { "id": 17477, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 17478, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Oil field machinery and equipment rental or leasing\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 17479, "SQL": "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,\"Offering fixed income funds\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 17480, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") order by sum(debit) desc limit 1" }, { "id": 17481, "SQL": "select sum(credit) from master_txn_table where product_service = \"Leveling and Trimming\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 17482, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Dillon Vega\" and transaction_type = 'invoice'" }, { "id": 17483, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 17484, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 17485, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Isaiah Cunningham\" ) " }, { "id": 17486, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 17487, "SQL": "select max(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 = \"Lawrence Curtis\" and 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') " }, { "id": 17488, "SQL": "select sum(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Apparel and shoes\" " }, { "id": 17489, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Richard Stone' or vendor = 'Richard Stone'" }, { "id": 17490, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Job Expenses\") and vendor = \"Jasmine Rodriguez\"" }, { "id": 17491, "SQL": "select transaction_id from master_txn_table where product_service = \"Coffee and Snack\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 17492, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Breanna Cowan' or vendor = 'Breanna Cowan'" }, { "id": 17493, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 17494, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Kim Hernandez\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 17495, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Retailing formal dining furniture\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 17496, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Latasha Alexander\" and transaction_type = 'invoice'" }, { "id": 17497, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Fast food restaurants\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 17498, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 17499, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 17500, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') group by billing_city" }, { "id": 17501, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Kevin Kennedy\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date) AND date(current_date) ) " }, { "id": 17502, "SQL": "select transaction_id from master_txn_table where customers = \"Diana Oneal\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 17503, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Repair & Maintenance (deleted)\") and 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') " }, { "id": 17504, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Elizabeth Neal\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 17505, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Wholesaling aeronautical equipment and supplies\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 17506, "SQL": "select transaction_date from master_txn_table where customers = \"Austin Osborn\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 17507, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Jennifer Decker\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date) AND date(current_date) )" }, { "id": 17508, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Jennifer Parker' or vendor = 'Jennifer Parker'" }, { "id": 17509, "SQL": "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\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 17510, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jennifer Sanchez\" ) " }, { "id": 17511, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Jamie Lutz\"" }, { "id": 17512, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by billing_city" }, { "id": 17513, "SQL": "select transaction_date from master_txn_table where customers = \"Erin Gregory\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 17514, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Carrie Humphrey\" order by transaction_date limit 1" }, { "id": 17515, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Melissa Reyes\" ) " }, { "id": 17516, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Cost of Labor\") and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 17517, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 17518, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 17519, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Tanya Franklin\" ) " }, { "id": 17520, "SQL": "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,\"Retailing formal dining furniture\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 17521, "SQL": "select transaction_date from master_txn_table where customers = \"Brandi Arnold\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 17522, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 17523, "SQL": "select transaction_id from master_txn_table where customers = \"Christine Kelley\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 17524, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Equipment Rental\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 17525, "SQL": "select transaction_date 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 = \"Locomotives\" order by transaction_date asc limit 1 " }, { "id": 17526, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 17527, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Cheyenne Watson\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) ) " }, { "id": 17528, "SQL": "select transaction_date from master_txn_table where customers = \"Jamie Davis\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 17529, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Megan Kim\" and transaction_type = 'invoice'" }, { "id": 17530, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Constructing bangalow\") and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 17531, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Tami White\"" }, { "id": 17532, "SQL": "select transaction_date from master_txn_table where customers = \"Mark Parker\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 17533, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 17534, "SQL": "select transaction_id from master_txn_table where customers = \"Jenny Gonzalez\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 17535, "SQL": "select min(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 = \"Jeffrey Powers\" and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 17536, "SQL": "select avg(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 = \"Misty Stone\" and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 17537, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Scott Kim\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 17538, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Laura Montes\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 17539, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 17540, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jose Schultz\" and transaction_type = 'invoice'" }, { "id": 17541, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 17542, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Timothy Harris\" ) " }, { "id": 17543, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kathy Robles\" ) " }, { "id": 17544, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sue Bell\" ) " }, { "id": 17545, "SQL": "select transaction_id from master_txn_table where product_service = \"Townhouses\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 17546, "SQL": "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 = \"Angela Curtis\" and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 17547, "SQL": "select transaction_date from master_txn_table where customers = \"Robert Shelton\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 17548, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Christopher Diaz\" ) " }, { "id": 17549, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Adam Mccarty\" ) " }, { "id": 17550, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Manufacturing peppermint oil\") and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 17551, "SQL": "select min(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 = \"Marcus Taylor\" and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 17552, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Peter Rivera\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) ) " }, { "id": 17553, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Alan Barber\" ) " }, { "id": 17554, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Stacy Thompson\" ) " }, { "id": 17555, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 17556, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 17557, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 17558, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 17559, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Paul Massey\" ) " }, { "id": 17560, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Robert Spears\"" }, { "id": 17561, "SQL": "select product_service, 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 transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') group by product_service order by sum(credit) desc limit 1" }, { "id": 17562, "SQL": "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,\"Medical services\") and 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') " }, { "id": 17563, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') group by billing_city" }, { "id": 17564, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Chris Ware\"" }, { "id": 17565, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 17566, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Seth Martinez\" order by transaction_date limit 1" }, { "id": 17567, "SQL": "select transaction_date 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 = \"Data storage management\" order by transaction_date asc limit 1 " }, { "id": 17568, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Troy Johnson\" order by transaction_date limit 1" }, { "id": 17569, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Sabrina Price\" and transaction_type = 'invoice'" }, { "id": 17570, "SQL": "select max(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 = \"Tammy Riley\" and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 17571, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 17572, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Ashley Clark\"" }, { "id": 17573, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jeremy Boyd\" ) " }, { "id": 17574, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Amateur sports teams and club servcies\") 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') " }, { "id": 17575, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Connie Waters\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') ) " }, { "id": 17576, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") group by billing_city" }, { "id": 17577, "SQL": "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,\"golf instruction services\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 17578, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 17579, "SQL": "select transaction_date 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 = \"Printing\" order by transaction_date asc limit 1 " }, { "id": 17580, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 17581, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Sharon Beck\" order by transaction_date limit 1" }, { "id": 17582, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Medication dispensing\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 17583, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 17584, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 17585, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Unapplied Cash Bill Payment Expense\") and vendor = \"Amber Brown\"" }, { "id": 17586, "SQL": "select transaction_id from master_txn_table where product_service = \"Helium\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 17587, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') and account_type in ('Expense','Other Expense') " }, { "id": 17588, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 17589, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Pool maintenance\" " }, { "id": 17590, "SQL": "select transaction_date from master_txn_table where customers = \"Molly Fisher\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 17591, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 17592, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Other non-renewable power generation\") and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 17593, "SQL": "select transaction_date 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 = \"Catering\" order by transaction_date asc limit 1 " }, { "id": 17594, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 17595, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Douglas Franco\" order by transaction_date limit 1" }, { "id": 17596, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jennifer Porter\" ) " }, { "id": 17597, "SQL": "select transaction_id from master_txn_table where customers = \"Lisa Clark\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 17598, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Danielle Butler\"" }, { "id": 17599, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Steven Hawkins\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) ) " }, { "id": 17600, "SQL": "select transaction_id from master_txn_table where product_service = \"Meal\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 17601, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Eric Choi\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 17602, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') order by sum(debit) desc limit 1" }, { "id": 17603, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') group by billing_city" }, { "id": 17604, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Oscar Hughes\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) )" }, { "id": 17605, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Christopher Wood\"" }, { "id": 17606, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Matthew Gregory\" ) " }, { "id": 17607, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Retailing master bedroom furniture\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 17608, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Jeffery Cox\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) )" }, { "id": 17609, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") group by billing_city" }, { "id": 17610, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 17611, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 17612, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 17613, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 17614, "SQL": "select max(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 = \"Connie Robertson\" and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 17615, "SQL": "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,\"Supplies\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 17616, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Janet Martin\" ) " }, { "id": 17617, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Nancy Lester\" ) " }, { "id": 17618, "SQL": "select transaction_id from master_txn_table where product_service = \"Data processing\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 17619, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Zachary Thompson\" and transaction_type = 'payment' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') )" }, { "id": 17620, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Bobby Wood\"" }, { "id": 17621, "SQL": "select transaction_id from master_txn_table where product_service = \"PCs\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 17622, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Johnny Ramos\" ) " }, { "id": 17623, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") group by product_service order by sum(credit) desc limit 1" }, { "id": 17624, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Angela Turner\" ) " }, { "id": 17625, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 17626, "SQL": "select transaction_date from master_txn_table where customers = \"Christina Arroyo\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 17627, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 17628, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Alexandra Arnold\" ) " }, { "id": 17629, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Transportation services\") and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 17630, "SQL": "select transaction_date from master_txn_table where customers = \"Douglas Solomon\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 17631, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Carolyn Delgado\" and transaction_type = 'payment' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') )" }, { "id": 17632, "SQL": "select transaction_date 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 = \"Emerging Market\" order by transaction_date asc limit 1 " }, { "id": 17633, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 17634, "SQL": "select min(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 = \"Amy Jacobson\" and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 17635, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Robert Cardenas\" ) " }, { "id": 17636, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jill Chapman\" ) " }, { "id": 17637, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Robert Howard MD\" ) " }, { "id": 17638, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 17639, "SQL": "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,\"Motorbike \") and 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') " }, { "id": 17640, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Samantha Campos\" and transaction_type = 'invoice'" }, { "id": 17641, "SQL": "select sum(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Oxygen\" " }, { "id": 17642, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Devin Williams\" and transaction_type = 'invoice'" }, { "id": 17643, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Peter Avery\" ) " }, { "id": 17644, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 17645, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Richard Rodriguez\" ) " }, { "id": 17646, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Trevor Maddox\" ) " }, { "id": 17647, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 17648, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 17649, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Samantha Kane\" and account_type in ('Expense','Other Expense') 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') " }, { "id": 17650, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Exercise equipment retailing\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 17651, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 17652, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 17653, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 17654, "SQL": "select transaction_date from master_txn_table where customers = \"Cheryl Wagner\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 17655, "SQL": "select transaction_date 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 = \"Toys\" order by transaction_date asc limit 1 " }, { "id": 17656, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Bethany Esparza\" ) " }, { "id": 17657, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Samuel Tate\" ) " }, { "id": 17658, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 17659, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Michael Dyer\" ) " }, { "id": 17660, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 17661, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Unapplied Cash Bill Payment Expense\") and vendor = \"Aaron Ferguson\"" }, { "id": 17662, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Shelly Howard\"" }, { "id": 17663, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Abandoned infant assistance\") and 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') " }, { "id": 17664, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 17665, "SQL": "select sum(credit) from master_txn_table where product_service = \"Navigational Instruments\" and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 17666, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 17667, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 17668, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Charles Bird\"" }, { "id": 17669, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 17670, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Christopher Wallace\" order by transaction_date limit 1" }, { "id": 17671, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Rose Green\" ) " }, { "id": 17672, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Christina Stokes\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) ) " }, { "id": 17673, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) group by billing_city" }, { "id": 17674, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Carolyn Ware\"" }, { "id": 17675, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 17676, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Dustin Russo\" ) " }, { "id": 17677, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Steven Sexton\" order by transaction_date limit 1" }, { "id": 17678, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') group by billing_city" }, { "id": 17679, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 17680, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Matthew King' or vendor = 'Matthew King'" }, { "id": 17681, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 17682, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 17683, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 17684, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Scott Martin\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 17685, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 17686, "SQL": "select transaction_date from master_txn_table where customers = \"Cathy Blevins\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 17687, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 17688, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Arthur Grant\" order by transaction_date limit 1" }, { "id": 17689, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Gerald Yu\" ) " }, { "id": 17690, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"William Fletcher\" ) " }, { "id": 17691, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Monique Holder\" ) " }, { "id": 17692, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 17693, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Jonathan Gordon' or vendor = 'Jonathan Gordon'" }, { "id": 17694, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Jeremiah Frye\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 17695, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Stacey Castro\" order by transaction_date limit 1" }, { "id": 17696, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Development of software products for Tablets\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 17697, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Pool maintenance\") and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 17698, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Project assessments\" " }, { "id": 17699, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 17700, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Connor Brown\" ) " }, { "id": 17701, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Jessica Lee\"" }, { "id": 17702, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Fuel\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 17703, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') group by billing_city" }, { "id": 17704, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Angela Thomas\" ) " }, { "id": 17705, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Ariana Castaneda\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) ) " }, { "id": 17706, "SQL": "select transaction_date 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 = \"Therapy\" order by transaction_date asc limit 1 " }, { "id": 17707, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 17708, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 17709, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jill Allison\" ) " }, { "id": 17710, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Bonnie Blair\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 17711, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where 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') and account_type in ('Expense','Other Expense') " }, { "id": 17712, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Elizabeth Curtis\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 17713, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kelly Baker\" ) " }, { "id": 17714, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Mark Banks\"" }, { "id": 17715, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Daniel Davis\"" }, { "id": 17716, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 17717, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 17718, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Sara Cooper\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 17719, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 17720, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 17721, "SQL": "select transaction_date from master_txn_table where customers = \"Allison Haynes\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 17722, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"David Torres MD\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 17723, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ann Brock\" ) " }, { "id": 17724, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 17725, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 17726, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Brenda Baker\" order by transaction_date limit 1" }, { "id": 17727, "SQL": "select transaction_date 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 = \"Golf Instructions\" order by transaction_date asc limit 1 " }, { "id": 17728, "SQL": "select sum(credit) from master_txn_table where product_service = \"Brokerage\" and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 17729, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by billing_city" }, { "id": 17730, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Steven Lee\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 17731, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Document copying services\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 17732, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Paula Nolan\" and transaction_type = 'payment' 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') ) " }, { "id": 17733, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"John Mueller\" order by transaction_date limit 1" }, { "id": 17734, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 17735, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Patricia Contreras\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 17736, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Waste-fueled\" " }, { "id": 17737, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Anna Alvarez\" ) " }, { "id": 17738, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Manufacturing industrial inorganic gases\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 17739, "SQL": "select transaction_date 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 = \"Home care\" order by transaction_date asc limit 1 " }, { "id": 17740, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Alicia Farmer\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') ) " }, { "id": 17741, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Hannah Lewis\" and transaction_type = 'invoice'" }, { "id": 17742, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Maintenance and Repair\") 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') " }, { "id": 17743, "SQL": "select min(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 = \"Ann Best\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 17744, "SQL": "select transaction_date 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 = \"Bangalow\" order by transaction_date asc limit 1 " }, { "id": 17745, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Antonio Terry\" ) " }, { "id": 17746, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Dennis Francis\" ) " }, { "id": 17747, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Samuel Palmer\" ) " }, { "id": 17748, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and 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') group by billing_city" }, { "id": 17749, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Michele Crawford\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 17750, "SQL": "select sum(credit) from master_txn_table where product_service = \"Cleaning\" and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 17751, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') and account_type in ('Expense','Other Expense') " }, { "id": 17752, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'John Webb' or vendor = 'John Webb'" }, { "id": 17753, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 17754, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Offering emerging market funds\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 17755, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Dustin Archer\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 17756, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 17757, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 17758, "SQL": "select min(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 = \"Jacqueline Thompson\" and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 17759, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Basic office and secretarial skills training\") and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 17760, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Ryan Scott\"" }, { "id": 17761, "SQL": "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,\"Barge rental or leasing\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 17762, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 17763, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 17764, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Steven Daniels\" ) " }, { "id": 17765, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Tracy Blanchard\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") ) " }, { "id": 17766, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 17767, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Larry Blackburn\" ) " }, { "id": 17768, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 17769, "SQL": "select transaction_date from master_txn_table where customers = \"Joseph Thomas\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 17770, "SQL": "select transaction_id from master_txn_table where product_service = \"Mailbox Services\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 17771, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Aaron Martin\" ) " }, { "id": 17772, "SQL": "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 loading and unloading services at rail terminals\") and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 17773, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 17774, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 17775, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 17776, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 17777, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Bethany Holmes\" ) " }, { "id": 17778, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Michelle Merritt\" ) " }, { "id": 17779, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by billing_city" }, { "id": 17780, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 17781, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Donald Sanchez\" order by transaction_date limit 1" }, { "id": 17782, "SQL": "select transaction_date from master_txn_table where customers = \"Roger Jones\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 17783, "SQL": "select transaction_date 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 = \"Meal\" order by transaction_date asc limit 1 " }, { "id": 17784, "SQL": "select min(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 = \"Stephanie Obrien\" and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 17785, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Lori Palmer\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) )" }, { "id": 17786, "SQL": "select min(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 = \"Kelly Morris\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 17787, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Permits\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 17788, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sarah Gardner\" ) " }, { "id": 17789, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 17790, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') and account_type in ('Expense','Other Expense') " }, { "id": 17791, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jason Chandler\" order by transaction_date limit 1" }, { "id": 17792, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 17793, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 17794, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Theresa Ross\" ) " }, { "id": 17795, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Amanda Torres\" ) " }, { "id": 17796, "SQL": "select transaction_date from master_txn_table where customers = \"Jeffrey Bullock\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 17797, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Other Income\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 17798, "SQL": "select sum(credit) from master_txn_table where product_service = \"Adoption\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 17799, "SQL": "select avg(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 = \"Charles Sheppard\" and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 17800, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Claudia Contreras\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 17801, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Equipment Rental\") and vendor = \"Jordan Woodward\"" }, { "id": 17802, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Maureen Everett\"" }, { "id": 17803, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"John Green\"" }, { "id": 17804, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Offering equity long bias\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 17805, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Darren Hernandez\" and transaction_type = 'payment' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') ) " }, { "id": 17806, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by billing_city" }, { "id": 17807, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Attire and accessories\") and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 17808, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 17809, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 17810, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Exercise equipment retailing\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 17811, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Terry Hubbard\"" }, { "id": 17812, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Baby formula and food\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 17813, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 17814, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Michael Crane\" ) " }, { "id": 17815, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Stephen Ellis\" ) " }, { "id": 17816, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Dale Calhoun\" ) " }, { "id": 17817, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 17818, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jessica Luna\" ) " }, { "id": 17819, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Paula Phillips\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") )" }, { "id": 17820, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Gina Webb\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 17821, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Postal\" " }, { "id": 17822, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sandra Bond\" ) " }, { "id": 17823, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 17824, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Stacy Johns\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) ) " }, { "id": 17825, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 17826, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Fees Billed\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 17827, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)group by product_service order by sum(credit) desc limit 1" }, { "id": 17828, "SQL": "select sum(credit) from master_txn_table where product_service = \"Recreation\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 17829, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Alex Lopez\" order by transaction_date limit 1" }, { "id": 17830, "SQL": "select sum(credit) from master_txn_table where product_service = \"Coordinators\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 17831, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') group by billing_city" }, { "id": 17832, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') order by sum(debit) desc limit 1" }, { "id": 17833, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 17834, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Cody Bowman\" ) " }, { "id": 17835, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Eucalyptus oil\" " }, { "id": 17836, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"James Marsh\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") )" }, { "id": 17837, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 17838, "SQL": "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,\"Dietary and nutritional services\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 17839, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Sara Tran\"" }, { "id": 17840, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Kaitlyn Morris\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') ) " }, { "id": 17841, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Ceremony & reception venue\") and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 17842, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Meals and Entertainment\") and vendor = \"Samantha Berry\"" }, { "id": 17843, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 17844, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Mary Torres\" order by transaction_date limit 1" }, { "id": 17845, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jennifer Fletcher\" ) " }, { "id": 17846, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 17847, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 17848, "SQL": "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,\"Farrier services\") and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 17849, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 17850, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kenneth Robinson\" ) " }, { "id": 17851, "SQL": "select transaction_id from master_txn_table where product_service = \"Locomotives\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 17852, "SQL": "select transaction_date from master_txn_table where customers = \"Ashley Goodman\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 17853, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kimberly Anderson\" ) " }, { "id": 17854, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 17855, "SQL": "select transaction_id from master_txn_table where customers = \"Jason Scott\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 17856, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Justin Mcgee\" ) " }, { "id": 17857, "SQL": "select transaction_date from master_txn_table where customers = \"Blake Barajas\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 17858, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Timothy Houston\" order by transaction_date limit 1" }, { "id": 17859, "SQL": "select transaction_id from master_txn_table where customers = \"James Sheppard\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 17860, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Melinda Bradley\" and transaction_type = 'invoice'" }, { "id": 17861, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Angela Munoz' or vendor = 'Angela Munoz'" }, { "id": 17862, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 17863, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 17864, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 17865, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Amanda Becker\" ) " }, { "id": 17866, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Sue Nguyen\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 17867, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Paula Morrow\" ) " }, { "id": 17868, "SQL": "select transaction_date 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 = \"Well casings\" order by transaction_date asc limit 1 " }, { "id": 17869, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Computer Repairs\") and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 17870, "SQL": "select min(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 = \"Jillian Santos\" and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 17871, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 17872, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Development of software products for PCs\") 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') " }, { "id": 17873, "SQL": "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,\"Shearing services\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 17874, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Holly Tucker\" ) " }, { "id": 17875, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Benjamin Wright' or vendor = 'Benjamin Wright'" }, { "id": 17876, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Andre Peters\" ) " }, { "id": 17877, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Stephen Everett\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 17878, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 17879, "SQL": "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,\"Private mailbox rental centers\") and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 17880, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 17881, "SQL": "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,\"Computer software and software application training\") and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 17882, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 17883, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Chelsea Powell\" order by transaction_date limit 1" }, { "id": 17884, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jamie Bond\" ) " }, { "id": 17885, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 17886, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') and account_type in ('Expense','Other Expense') " }, { "id": 17887, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Melanie Clements\" ) " }, { "id": 17888, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 17889, "SQL": "select min(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 = \"Oscar Osborne\" 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') " }, { "id": 17890, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 17891, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Eric Vasquez\"" }, { "id": 17892, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Anne Jones\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 17893, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Veronica Bonilla\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 17894, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 17895, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Wayne Massey\"" }, { "id": 17896, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Mary Proctor\" ) " }, { "id": 17897, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Cynthia Calderon\" ) " }, { "id": 17898, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Jennifer Rush\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 17899, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Construction management services\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 17900, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Derrick Ross\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') ) " }, { "id": 17901, "SQL": "select transaction_date 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 = \"Design\" order by transaction_date asc limit 1 " }, { "id": 17902, "SQL": "select transaction_id from master_txn_table where customers = \"Heather Rodriguez\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 17903, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Julie Moreno DDS\" ) " }, { "id": 17904, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') and account_type in ('Expense','Other Expense') " }, { "id": 17905, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Regina Hernandez' or vendor = 'Regina Hernandez'" }, { "id": 17906, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Providing support for money investment securities\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 17907, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Dorothy Adams\" and transaction_type = 'invoice'" }, { "id": 17908, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Denise Randall\" ) " }, { "id": 17909, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Barbara Robinson' or vendor = 'Barbara Robinson'" }, { "id": 17910, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Robert Gallegos\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') )" }, { "id": 17911, "SQL": "select transaction_id from master_txn_table where product_service = \"Postal\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 17912, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 17913, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Megan Vega\" and account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 17914, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Hydrogen manufacturing\") and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 17915, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 17916, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Renee Spencer\" ) " }, { "id": 17917, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 17918, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 17919, "SQL": "select product_service, 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 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') group by product_service order by sum(credit) desc limit 1" }, { "id": 17920, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Aircraft rental or leasing\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 17921, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 17922, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 17923, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Garrett Adams\" and transaction_type = 'payment' 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') ) " }, { "id": 17924, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Donald Brown\"" }, { "id": 17925, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Stacey Martin\"" }, { "id": 17926, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Darren Lopez\" ) " }, { "id": 17927, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Martin Colon\" order by transaction_date limit 1" }, { "id": 17928, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Offering equity long bias\") and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 17929, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 17930, "SQL": "select sum(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"PCs\" " }, { "id": 17931, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name 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 account_type in ('Expense','Other Expense') " }, { "id": 17932, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"--\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 17933, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Monica Weaver\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 17934, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Megan Lawrence\" ) " }, { "id": 17935, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jessica Greene\" and transaction_type = 'invoice'" }, { "id": 17936, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 17937, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Jeanne Gregory\" and transaction_type = 'payment' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') )" }, { "id": 17938, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Michael Davis\"" }, { "id": 17939, "SQL": "select transaction_date 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 = \"Golf Equipment\" order by transaction_date asc limit 1 " }, { "id": 17940, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Rodney Banks\" ) " }, { "id": 17941, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"David Edwards\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 17942, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 17943, "SQL": "select transaction_date from master_txn_table where customers = \"Jennifer Peters\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 17944, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 17945, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Development of other voice and speech recognition products\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 17946, "SQL": "select transaction_id from master_txn_table where product_service = \"Flowers\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 17947, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 17948, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Providing financial planning services\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 17949, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Alec Potts\"" }, { "id": 17950, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Debra Carroll\" ) " }, { "id": 17951, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 17952, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Hydrogen manufacturing\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 17953, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Ashley Powell\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 17954, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 17955, "SQL": "select transaction_date from master_txn_table where customers = \"Meagan Howard\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 17956, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Recognition software for IT and telecommunications\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 17957, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Trevor Kennedy\" ) " }, { "id": 17958, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Zachary Foster\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) )" }, { "id": 17959, "SQL": "select transaction_date 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 = \"Rental\" order by transaction_date asc limit 1 " }, { "id": 17960, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 17961, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Morgan Wall\" ) " }, { "id": 17962, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Life cycle asset management\" " }, { "id": 17963, "SQL": "select transaction_id from master_txn_table where product_service = \"Organic Gases\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 17964, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and 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') group by billing_city" }, { "id": 17965, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Bank Charges\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 17966, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by billing_city" }, { "id": 17967, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 17968, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Carol Harris\" ) " }, { "id": 17969, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Tyler Jackson\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 17970, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Anthony Stevens\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) ) " }, { "id": 17971, "SQL": "select sum(credit) from master_txn_table where product_service = \"Child abuse prevention\" and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 17972, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 17973, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by billing_city" }, { "id": 17974, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 17975, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kenneth Robinson\" ) " }, { "id": 17976, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Constructing multiunit special-needs complexes\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 17977, "SQL": "select transaction_id from master_txn_table where customers = \"Miss Amanda Allen PhD\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 17978, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kimberly Phillips\" ) " }, { "id": 17979, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Susan Banks\" ) " }, { "id": 17980, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kendra Flores\" ) " }, { "id": 17981, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Gas and Electric\") 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') " }, { "id": 17982, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Non-musical performances\") and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 17983, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Gas and Electric\") and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 17984, "SQL": "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 financial planning services\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 17985, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Donald Santiago\"" }, { "id": 17986, "SQL": "select transaction_date from master_txn_table where customers = \"Andrea Singh\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 17987, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Nitrogen manufacturing\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 17988, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 17989, "SQL": "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,\"Meal services\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 17990, "SQL": "select transaction_date 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 = \"Shearing\" order by transaction_date asc limit 1 " }, { "id": 17991, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Senior-care\" " }, { "id": 17992, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Michael Mcdaniel\" ) " }, { "id": 17993, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Carolyn Rice\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) ) " }, { "id": 17994, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Keith Dickson\" ) " }, { "id": 17995, "SQL": "select max(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 = \"Nathan Klein\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 17996, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Jeremiah Hall\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 17997, "SQL": "select transaction_date 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 = \"Railroad terminals\" order by transaction_date asc limit 1 " }, { "id": 17998, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 17999, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Alexis Zavala\" ) " }, { "id": 18000, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Derek Hernandez' or vendor = 'Derek Hernandez'" }, { "id": 18001, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 18002, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 18003, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Donna Sanders\" order by transaction_date limit 1" }, { "id": 18004, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Amanda Marshall\" ) " }, { "id": 18005, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Manufacturing lemon oil\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 18006, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Coffee and snack shops\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 18007, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Craig Nolan\"" }, { "id": 18008, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 18009, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Matthew Harrison\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) ) " }, { "id": 18010, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Brian Anderson\"" }, { "id": 18011, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 18012, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 18013, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') group by billing_city" }, { "id": 18014, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Veronica Wilkins\" ) " }, { "id": 18015, "SQL": "select max(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 = \"Louis Bailey\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 18016, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Computer Repairs\") and vendor = \"Tommy White\"" }, { "id": 18017, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Social activities\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 18018, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Full-service restaurants\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 18019, "SQL": "select sum(credit) from master_txn_table where product_service = \"Attire and accessories\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 18020, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 18021, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') and account_type in ('Expense','Other Expense') " }, { "id": 18022, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Rachel Cruz\" ) " }, { "id": 18023, "SQL": "select transaction_date 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 = \"Data storage management\" order by transaction_date asc limit 1 " }, { "id": 18024, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Repair & Maintenance (deleted)\") and vendor = \"Holly Smith\"" }, { "id": 18025, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Crystal Hernandez\" ) " }, { "id": 18026, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Sarah Maldonado\" and transaction_type = 'invoice'" }, { "id": 18027, "SQL": "select sum(credit) from master_txn_table where product_service = \"Auto mobiles\" and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 18028, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 18029, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Michael Gonzalez\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 18030, "SQL": "select transaction_id from master_txn_table where product_service = \"Software Training\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 18031, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Julie Martin\" order by transaction_date limit 1" }, { "id": 18032, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Betty Tucker\" ) " }, { "id": 18033, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Tyler Mills\" order by transaction_date limit 1" }, { "id": 18034, "SQL": "select transaction_date 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 = \"Environmental impact assessment\" order by transaction_date asc limit 1 " }, { "id": 18035, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Mitchell Jones\" ) " }, { "id": 18036, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Brian Payne\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 18037, "SQL": "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 eucalyptus oil\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 18038, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Dennis Peters\" and transaction_type = 'invoice'" }, { "id": 18039, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 18040, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Marc Howard\"" }, { "id": 18041, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Running, cutting and pulling casings, tubes and rods\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 18042, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"David Kelley\" order by transaction_date limit 1" }, { "id": 18043, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Elizabeth Wright\"" }, { "id": 18044, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ethan Watts\" ) " }, { "id": 18045, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 18046, "SQL": "select transaction_date from master_txn_table where customers = \"Kelly Taylor\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 18047, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Erin Wilson\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 18048, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 18049, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'William Wallace' or vendor = 'William Wallace'" }, { "id": 18050, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Emily Lynch\" order by transaction_date limit 1" }, { "id": 18051, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Nicholas Daniel\" ) " }, { "id": 18052, "SQL": "select transaction_date 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 = \"Spearmint oil\" order by transaction_date asc limit 1 " }, { "id": 18053, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Constructing condominiums\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 18054, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') order by sum(debit) desc limit 1" }, { "id": 18055, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Carrie Moreno\" ) " }, { "id": 18056, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 18057, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jack Gregory\"" }, { "id": 18058, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') order by sum(debit) desc limit 1" }, { "id": 18059, "SQL": "select transaction_date from master_txn_table where customers = \"Casey Hernandez\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 18060, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Heavy construction equipment rental\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 18061, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by billing_city" }, { "id": 18062, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 18063, "SQL": "select product_service, 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 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') group by product_service order by sum(credit) desc limit 1" }, { "id": 18064, "SQL": "select transaction_date from master_txn_table where customers = \"Richard Dyer\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 18065, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Shelley Martinez\" ) " }, { "id": 18066, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Tina White\" and transaction_type = 'payment' and 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') ) " }, { "id": 18067, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Zachary Leach\" ) " }, { "id": 18068, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 18069, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Steven Lawrence\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 18070, "SQL": "select max(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 = \"Christy Ramirez\" and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 18071, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 18072, "SQL": "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,\"Billable Expense Income\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 18073, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 18074, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"John Edwards\"" }, { "id": 18075, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 18076, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 18077, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Christopher Tran\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 18078, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 18079, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 18080, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Gary Brooks\" and transaction_type = 'invoice'" }, { "id": 18081, "SQL": "select transaction_date from master_txn_table where customers = \"John Huynh\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 18082, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 18083, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"environmental projects\" " }, { "id": 18084, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 18085, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 18086, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 18087, "SQL": "select transaction_id from master_txn_table where customers = \"Tammy Camacho\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 18088, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Cody Ryan\" ) " }, { "id": 18089, "SQL": "select transaction_date from master_txn_table where customers = \"Joy Hunter\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 18090, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 18091, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Jonathan Galvan PhD\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 18092, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 18093, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Lauren Maxwell\"" }, { "id": 18094, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Kim Hernandez\"" }, { "id": 18095, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 18096, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Maria Welch\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) )" }, { "id": 18097, "SQL": "select transaction_date from master_txn_table where customers = \"Laura Kennedy\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 18098, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Alexis Scott\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 18099, "SQL": "select transaction_id from master_txn_table where product_service = \"Hydroelectric electricity\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 18100, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Richard Brooks\" and transaction_type = 'invoice'" }, { "id": 18101, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by billing_city" }, { "id": 18102, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 18103, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 18104, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 18105, "SQL": "select transaction_date 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 = \"Wind power\" order by transaction_date asc limit 1 " }, { "id": 18106, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 18107, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Retailing Sleepers\") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 18108, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Ronald Jackson\"" }, { "id": 18109, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Amy Anderson\" ) " }, { "id": 18110, "SQL": "select transaction_date 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 = \"Railroad terminals\" order by transaction_date asc limit 1 " }, { "id": 18111, "SQL": "select transaction_date from master_txn_table where customers = \"Erin Casey\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 18112, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Joan Avery\" ) " }, { "id": 18113, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Window washing\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 18114, "SQL": "select transaction_id from master_txn_table where customers = \"Tammy Riley\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 18115, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Thomas Miller\" ) " }, { "id": 18116, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Tyler Bowers' or vendor = 'Tyler Bowers'" }, { "id": 18117, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Michael Hansen\" ) " }, { "id": 18118, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Ceremony & reception venue\") and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 18119, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Yolanda Cole\"" }, { "id": 18120, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') group by billing_city" }, { "id": 18121, "SQL": "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,\"Retailing stationary sofas/sofa-sleepers\") and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 18122, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Scott Thompson\" and transaction_type = 'invoice'" }, { "id": 18123, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') group by billing_city" }, { "id": 18124, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Jose Walters' or vendor = 'Jose Walters'" }, { "id": 18125, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Michelle Carter\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 18126, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') order by sum(debit) desc limit 1" }, { "id": 18127, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 18128, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 18129, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Eugene Young\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") )" }, { "id": 18130, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Peppermint oil\" " }, { "id": 18131, "SQL": "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,\"Photography\") and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 18132, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') group by billing_city" }, { "id": 18133, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Baby formula and food\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 18134, "SQL": "select product_service, 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 transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') group by product_service order by sum(credit) desc limit 1" }, { "id": 18135, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Samantha Rocha\" ) " }, { "id": 18136, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 18137, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Keith Sanchez\"" }, { "id": 18138, "SQL": "select transaction_id from master_txn_table where customers = \"Christian Jacobs\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 18139, "SQL": "select transaction_date 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 = \"Furniture\" order by transaction_date asc limit 1 " }, { "id": 18140, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Nicholas Cook\" ) " }, { "id": 18141, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Robert Moss\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 18142, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Cody Sims\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 18143, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 18144, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Bethany Monroe\" order by transaction_date limit 1" }, { "id": 18145, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Kendra Thomas\" order by transaction_date limit 1" }, { "id": 18146, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 18147, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Data storage and management services\") and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 18148, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') group by billing_city" }, { "id": 18149, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Lindsey Diaz\" and transaction_type = 'invoice'" }, { "id": 18150, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Michael Lopez\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 18151, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 18152, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Tiffany Alexander MD\" ) " }, { "id": 18153, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Alicia Anderson\" ) " }, { "id": 18154, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Christopher Macias\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 18155, "SQL": "select sum(credit) from master_txn_table where product_service = \"Mailbox Rental\" and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 18156, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Renee Robinson\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date) AND date(current_date) )" }, { "id": 18157, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by billing_city" }, { "id": 18158, "SQL": "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,\"Constructing bangalow\") and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 18159, "SQL": "select transaction_date from master_txn_table where customers = \"Courtney Allen\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 18160, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Pool maintenance\" " }, { "id": 18161, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date) AND date(current_date) group by billing_city" }, { "id": 18162, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"George Smith\" ) " }, { "id": 18163, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Keith Mills\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') )" }, { "id": 18164, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 18165, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Christian Hartman\" ) " }, { "id": 18166, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Blueprinting services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 18167, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Christina Ware\" and transaction_type = 'payment' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') ) " }, { "id": 18168, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Anna Odonnell\"" }, { "id": 18169, "SQL": "select avg(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 = \"Michelle Carr\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 18170, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Wholesaling railroad equipment and supplies\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 18171, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Non-musical\" " }, { "id": 18172, "SQL": "select avg(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 = \"Misty Melendez\" and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 18173, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Terry Obrien\" ) " }, { "id": 18174, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 18175, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 18176, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Amy Sanchez\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 18177, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Alexis Zavala\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 18178, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 18179, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Jacqueline Gomez\"" }, { "id": 18180, "SQL": "select transaction_date from master_txn_table where customers = \"Dylan Johns\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 18181, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Stationery & Printing\") and vendor = \"Nancy Vang\"" }, { "id": 18182, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Timothy Edwards\" ) " }, { "id": 18183, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Design and management services \") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 18184, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Quality management accreditation\") and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 18185, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 18186, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Tyler Howard\"" }, { "id": 18187, "SQL": "select transaction_id from master_txn_table where customers = \"Earl Wheeler\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 18188, "SQL": "select transaction_id from master_txn_table where customers = \"Andrea Singh\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 18189, "SQL": "select transaction_date from master_txn_table where customers = \"Luke Thomas\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 18190, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Katie Bennett\" and transaction_type = 'payment' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') ) " }, { "id": 18191, "SQL": "select transaction_id from master_txn_table where product_service = \"Social\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 18192, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Parking lot and driveway washing\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 18193, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' 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') " }, { "id": 18194, "SQL": "select max(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 = \"Amanda Stevens\" and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 18195, "SQL": "select transaction_date 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 = \"Service Provisioning\" order by transaction_date asc limit 1 " }, { "id": 18196, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 18197, "SQL": "select sum(credit) from master_txn_table where product_service = \"Tournaments and Matches\" and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 18198, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Michele Nelson\" ) " }, { "id": 18199, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Christopher Barber\"" }, { "id": 18200, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Garrett Townsend\" and transaction_type = 'invoice'" }, { "id": 18201, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Samantha Hatfield\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 18202, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Keith Chavez\" ) " }, { "id": 18203, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Joshua Parker\" ) " }, { "id": 18204, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 18205, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 18206, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Amy Anderson\" ) " }, { "id": 18207, "SQL": "select transaction_id from master_txn_table where product_service = \"Design\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 18208, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Dale Bentley\" ) " }, { "id": 18209, "SQL": "select transaction_id from master_txn_table where product_service = \"Shearing\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 18210, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 18211, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Mark Campbell\" ) " }, { "id": 18212, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Brandi Matthews\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 18213, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 18214, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Lori Wilcox\"" }, { "id": 18215, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 18216, "SQL": "select transaction_date from master_txn_table where customers = \"Carlos Mckee\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 18217, "SQL": "select transaction_date 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 = \"Railcar\" order by transaction_date asc limit 1 " }, { "id": 18218, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 18219, "SQL": "select transaction_id from master_txn_table where customers = \"Bryan Henry\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 18220, "SQL": "select avg(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 = \"Danielle Davis\" and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 18221, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 18222, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 18223, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 18224, "SQL": "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,\"Heavy construction equipment rental\") and 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') " }, { "id": 18225, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Photocopying\" " }, { "id": 18226, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Joseph Fleming\" order by transaction_date limit 1" }, { "id": 18227, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Providing independent operation of railroad terminals\") and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 18228, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by billing_city" }, { "id": 18229, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Benjamin Cole\" order by transaction_date limit 1" }, { "id": 18230, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 18231, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 18232, "SQL": "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,\"Dietary and nutritional services\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 18233, "SQL": "select transaction_id from master_txn_table where customers = \"Joshua Gutierrez\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 18234, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Becky Jones\"" }, { "id": 18235, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Retailing entertainment furniture\") and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 18236, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Retailing stationary sofas/sofa-sleepers\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 18237, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 18238, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Photography\") and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 18239, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 18240, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') group by product_service order by sum(credit) desc limit 1" }, { "id": 18241, "SQL": "select transaction_id from master_txn_table where customers = \"Maria Flores\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 18242, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Computer Programming\" " }, { "id": 18243, "SQL": "select transaction_date from master_txn_table where customers = \"Lindsey Reyes\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 18244, "SQL": "select transaction_date 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 = \"Copying\" order by transaction_date asc limit 1 " }, { "id": 18245, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Renee Peterson' or vendor = 'Renee Peterson'" }, { "id": 18246, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 18247, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Eric Castaneda\" ) " }, { "id": 18248, "SQL": "select avg(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 = \"Ashlee Moody\" and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 18249, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 18250, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date) AND date(current_date) group by billing_city" }, { "id": 18251, "SQL": "select transaction_date from master_txn_table where customers = \"Ricky Hunter\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 18252, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)group by product_service order by sum(credit) desc limit 1" }, { "id": 18253, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Athletic uniforms retailing\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 18254, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Heather Cox\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 18255, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 18256, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 18257, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Daniel Dalton\" order by transaction_date limit 1" }, { "id": 18258, "SQL": "select transaction_id from master_txn_table where product_service = \"Construction Projects\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 18259, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 18260, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"John Arias\" and transaction_type = 'invoice'" }, { "id": 18261, "SQL": "select min(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 = \"Christopher Woods\" and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 18262, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Savings\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 18263, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Meredith Hall' or vendor = 'Meredith Hall'" }, { "id": 18264, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Abandoned infant assistance\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 18265, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 18266, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 18267, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Reginald Moore\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 18268, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Christy Freeman\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 18269, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Michael Long\"" }, { "id": 18270, "SQL": "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,\"Daily living assistance\") and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 18271, "SQL": "select sum(credit) from master_txn_table where product_service = \"Recreational programs\" and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 18272, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Donna Thomas\" ) " }, { "id": 18273, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Brandon Stark' or vendor = 'Brandon Stark'" }, { "id": 18274, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Reginald Page\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') )" }, { "id": 18275, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brenda Fletcher\" ) " }, { "id": 18276, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Collin Simmons\" order by transaction_date limit 1" }, { "id": 18277, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Geothermal\" " }, { "id": 18278, "SQL": "select max(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 = \"Brittany Mathews\" and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 18279, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Shannon Anderson\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 18280, "SQL": "select transaction_date 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 = \"Industrial manufacturing\" order by transaction_date asc limit 1 " }, { "id": 18281, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 18282, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 18283, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 18284, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Promotional\") and vendor = \"Michael Hanna\"" }, { "id": 18285, "SQL": "select transaction_date from master_txn_table where customers = \"Frances Miller\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 18286, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"David Costa\"" }, { "id": 18287, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Cody Barnes\" ) " }, { "id": 18288, "SQL": "select min(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 = \"Heather Harmon\" and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 18289, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 18290, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 18291, "SQL": "select transaction_id from master_txn_table where product_service = \"Mining machinery\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 18292, "SQL": "select sum(credit) from master_txn_table where product_service = \"Locomotives\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 18293, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"food and beverage services\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 18294, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Christopher Cordova\" ) " }, { "id": 18295, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Thomas Randolph\" ) " }, { "id": 18296, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 18297, "SQL": "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,\"Teen outreach services\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 18298, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 18299, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Commissions & fees\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 18300, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Janet Watson\" ) " }, { "id": 18301, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Ashley Foster\" order by transaction_date limit 1" }, { "id": 18302, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Ashley Padilla\"" }, { "id": 18303, "SQL": "select transaction_id from master_txn_table where product_service = \"Bangalow\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 18304, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Mary Gray\" ) " }, { "id": 18305, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Carbon dioxide manufacturing\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 18306, "SQL": "select max(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 = \"Leah Lewis\" and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 18307, "SQL": "select transaction_date 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 = \"Services\" order by transaction_date asc limit 1 " }, { "id": 18308, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 18309, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Joshua Mathews\" and transaction_type = 'payment' and 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') )" }, { "id": 18310, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 18311, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Samantha Hill\" ) " }, { "id": 18312, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Steno class\" " }, { "id": 18313, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Betty Tucker\" order by transaction_date limit 1" }, { "id": 18314, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 18315, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 18316, "SQL": "select transaction_date 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 = \"Invitations\" order by transaction_date asc limit 1 " }, { "id": 18317, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Paul Levy\" ) " }, { "id": 18318, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Shawn Compton\"" }, { "id": 18319, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"John Ashley\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 18320, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jonathan Davenport\" ) " }, { "id": 18321, "SQL": "select transaction_id from master_txn_table where customers = \"Sheila Hoffman\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 18322, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') order by sum(debit) desc limit 1" }, { "id": 18323, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Cory Thomas\" ) " }, { "id": 18324, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Entertainment\" " }, { "id": 18325, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Omar Singleton\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 18326, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 18327, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Rebecca Warren' or vendor = 'Rebecca Warren'" }, { "id": 18328, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Courtney Roberson\" ) " }, { "id": 18329, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Francisco Pierce\" ) " }, { "id": 18330, "SQL": "select transaction_date 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 = \"Ceremony & reception venue\" order by transaction_date asc limit 1 " }, { "id": 18331, "SQL": "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 financial investment management services\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 18332, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Cathy Wade\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 18333, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Christopher Macias' or vendor = 'Christopher Macias'" }, { "id": 18334, "SQL": "select transaction_date from master_txn_table where customers = \"Erin Jenkins\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 18335, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Brian Wood\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 18336, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 18337, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') group by billing_city" }, { "id": 18338, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Carl Mitchell\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 18339, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brandy Burns\" ) " }, { "id": 18340, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 18341, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 18342, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Timothy Waters\" ) " }, { "id": 18343, "SQL": "select transaction_date from master_txn_table where customers = \"Teresa Walsh\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 18344, "SQL": "select transaction_date from master_txn_table where customers = \"Amanda Brown\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 18345, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Marie Brown\" ) " }, { "id": 18346, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Food\" " }, { "id": 18347, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Gregg Cruz\" order by transaction_date limit 1" }, { "id": 18348, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 18349, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Mathew Walsh\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') )" }, { "id": 18350, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Tiffany Davis\" ) " }, { "id": 18351, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Gabriel Freeman\" and transaction_type = 'invoice'" }, { "id": 18352, "SQL": "select transaction_id from master_txn_table where customers = \"Lindsey Smith\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 18353, "SQL": "select min(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 = \"David Farmer\" and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 18354, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') group by billing_city" }, { "id": 18355, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Helen Smith\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 18356, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by billing_city" }, { "id": 18357, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) group by billing_city" }, { "id": 18358, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Susan Ortiz\"" }, { "id": 18359, "SQL": "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,\"golf courses and country clubs\") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 18360, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Carolyn Hunter\" ) " }, { "id": 18361, "SQL": "select transaction_date from master_txn_table where customers = \"Gerald Benson\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 18362, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"David Villa\"" }, { "id": 18363, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Olivia Coleman\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 18364, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") order by sum(debit) desc limit 1" }, { "id": 18365, "SQL": "select transaction_date 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\" order by transaction_date asc limit 1 " }, { "id": 18366, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brent Weaver\" ) " }, { "id": 18367, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Gina Robertson\" ) " }, { "id": 18368, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 18369, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Elijah Turner\" ) " }, { "id": 18370, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Mary Martin\" ) " }, { "id": 18371, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'David Terrell' or vendor = 'David Terrell'" }, { "id": 18372, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ashley Bishop\" ) " }, { "id": 18373, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 18374, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 18375, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') group by billing_city" }, { "id": 18376, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Tonya Johnson\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) ) " }, { "id": 18377, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 18378, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Luke Rodriguez\" ) " }, { "id": 18379, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Taxes & Licenses\") and vendor = \"Samantha Gardner\"" }, { "id": 18380, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Michelle George\" ) " }, { "id": 18381, "SQL": "select transaction_date from master_txn_table where customers = \"Tammy Spears MD\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 18382, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Discounts given\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 18383, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Randy Davenport\" ) " }, { "id": 18384, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 18385, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sara Randall\" ) " }, { "id": 18386, "SQL": "select max(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 = \"Rebecca Haley\" and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 18387, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 18388, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Andrew Ritter\" ) " }, { "id": 18389, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Roger Thomas\" and transaction_type = 'invoice'" }, { "id": 18390, "SQL": "select transaction_date from master_txn_table where customers = \"Andrew Sanders\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 18391, "SQL": "select transaction_date from master_txn_table where customers = \"Meredith Smith\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 18392, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jay May\" ) " }, { "id": 18393, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Lauren Torres\" order by transaction_date limit 1" }, { "id": 18394, "SQL": "select transaction_id from master_txn_table where customers = \"Trevor Lewis\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 18395, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 18396, "SQL": "select sum(credit) from master_txn_table where product_service = \"high-rise and low-rise buildings\" and 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') " }, { "id": 18397, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 18398, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Chad Schwartz\" ) " }, { "id": 18399, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Ronald Brown\" order by transaction_date limit 1" }, { "id": 18400, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 18401, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Alan Anderson\" ) " }, { "id": 18402, "SQL": "select transaction_id from master_txn_table where product_service = \"Government Purposes\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 18403, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Cesar Medina\" order by transaction_date limit 1" }, { "id": 18404, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Decks and Patios\") and vendor = \"Daniel Davis\"" }, { "id": 18405, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 18406, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Thomas Mckinney\" ) " }, { "id": 18407, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Deborah Powell\" ) " }, { "id": 18408, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 18409, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Commissions & fees\") and vendor = \"Benjamin Osborn\"" }, { "id": 18410, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 18411, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 18412, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Amanda Tanner\" order by transaction_date limit 1" }, { "id": 18413, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"attached and detached units\" " }, { "id": 18414, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') 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') order by sum(debit) desc limit 1" }, { "id": 18415, "SQL": "select transaction_date from master_txn_table where customers = \"Kristin Ballard\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 18416, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 18417, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Dance performances\") and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 18418, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Michael Powell' or vendor = 'Michael Powell'" }, { "id": 18419, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Elizabeth Stewart\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 18420, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 18421, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 18422, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 18423, "SQL": "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 = \"Tara Stewart\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 18424, "SQL": "select transaction_date 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 = \"Meals\" order by transaction_date asc limit 1 " }, { "id": 18425, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 18426, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Patrick Dixon\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 18427, "SQL": "select min(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 = \"Laura Booth\" and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 18428, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 18429, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Anthony Conrad III\"" }, { "id": 18430, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Darryl Castillo\"" }, { "id": 18431, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sarah Jenkins\" ) " }, { "id": 18432, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ashley Heath\" ) " }, { "id": 18433, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Anna Callahan\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) )" }, { "id": 18434, "SQL": "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,\"Home-care Service\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 18435, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Chad Evans\" order by transaction_date limit 1" }, { "id": 18436, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 18437, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') group by billing_city" }, { "id": 18438, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 18439, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kendra Li\" ) " }, { "id": 18440, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 18441, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 18442, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Shelby Wheeler\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 18443, "SQL": "select transaction_id from master_txn_table where product_service = \"Biomass electricity\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 18444, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 18445, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 18446, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 18447, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Paul Thomas\" ) " }, { "id": 18448, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Dalton Hendrix\" and transaction_type = 'invoice'" }, { "id": 18449, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Devin Wise\" ) " }, { "id": 18450, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Vincent Bryant\" order by transaction_date limit 1" }, { "id": 18451, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Dustin Bennett\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) )" }, { "id": 18452, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Maria Flores\"" }, { "id": 18453, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") group by product_service order by sum(credit) desc limit 1" }, { "id": 18454, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 18455, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Karen Barron\" ) " }, { "id": 18456, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Ann Harris\"" }, { "id": 18457, "SQL": "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 = \"Stephanie Jensen\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 18458, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 18459, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Charles Rice\"" }, { "id": 18460, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Terri Guzman\" ) " }, { "id": 18461, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lauren Smith\" ) " }, { "id": 18462, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Willie Mccormick' or vendor = 'Willie Mccormick'" }, { "id": 18463, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 18464, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') group by billing_city" }, { "id": 18465, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Rebecca Morse\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) ) " }, { "id": 18466, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"George Clark\" and transaction_type = 'invoice'" }, { "id": 18467, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Keith Brown\" ) " }, { "id": 18468, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 18469, "SQL": "select transaction_id from master_txn_table where customers = \"Frances Thompson\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 18470, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Home-care Service\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 18471, "SQL": "select transaction_id from master_txn_table where product_service = \"Mailbox Rental\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 18472, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Candace Ryan\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') )" }, { "id": 18473, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"James Patton\"" }, { "id": 18474, "SQL": "select transaction_date 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 = \"Bicycle\" order by transaction_date asc limit 1 " }, { "id": 18475, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Kathy Heath\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') )" }, { "id": 18476, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 18477, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 18478, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Michelle Clark\" ) " }, { "id": 18479, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 18480, "SQL": "select sum(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Intravenous Therapy\" " }, { "id": 18481, "SQL": "select sum(credit) from master_txn_table where product_service = \"Hydroelectric electricity\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 18482, "SQL": "select transaction_id from master_txn_table where product_service = \"Fast food\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 18483, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Kim Hernandez\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 18484, "SQL": "select max(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 = \"Warren Sanchez\" and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 18485, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Decks and Patios\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 18486, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Molly Gonzalez\" ) " }, { "id": 18487, "SQL": "select transaction_date from master_txn_table where customers = \"Karen Cortez\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 18488, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Crystal Tran DDS\" ) " }, { "id": 18489, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Tony Hanson\"" }, { "id": 18490, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Anne Evans\" ) " }, { "id": 18491, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Building Repairs\") and vendor = \"Gail Schneider\"" }, { "id": 18492, "SQL": "select transaction_date from master_txn_table where customers = \"Betty Cherry\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 18493, "SQL": "select sum(credit) from master_txn_table where product_service = \"Bedding\" and 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') " }, { "id": 18494, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Baby strollers\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 18495, "SQL": "select transaction_id from master_txn_table where product_service = \"Leveling and Trimming\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 18496, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Riley Koch\" ) " }, { "id": 18497, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brittany Landry\" ) " }, { "id": 18498, "SQL": "select transaction_date 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 = \"Web hosting\" order by transaction_date asc limit 1 " }, { "id": 18499, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Jacob Acosta\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') ) " }, { "id": 18500, "SQL": "select product_service, 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 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') group by product_service order by sum(credit) desc limit 1" }, { "id": 18501, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Rachael Ortega\"" }, { "id": 18502, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Latoya Odonnell\" ) " }, { "id": 18503, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Sharon Matthews' or vendor = 'Sharon Matthews'" }, { "id": 18504, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Tyler King\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') ) " }, { "id": 18505, "SQL": "select transaction_date from master_txn_table where customers = \"Marissa Solomon\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 18506, "SQL": "select sum(credit) from master_txn_table where product_service = \"Coal\" and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 18507, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Bars and Nightclubs\" " }, { "id": 18508, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Cost of Labor\") and vendor = \"Beverly Parker\"" }, { "id": 18509, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Roger Vega\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 18510, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Occupational and vocational therapy\") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 18511, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Basic office and secretarial skills training\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 18512, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Joan Trevino\" and account_type in ('Expense','Other Expense') and 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') " }, { "id": 18513, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Joan Logan\"" }, { "id": 18514, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Claudia Rogers\" order by transaction_date limit 1" }, { "id": 18515, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') group by billing_city" }, { "id": 18516, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Joseph Lawrence\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') )" }, { "id": 18517, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Providing financing related to securities\") and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 18518, "SQL": "select transaction_id from master_txn_table where customers = \"Amber Rogers\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 18519, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Dana Castillo\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) )" }, { "id": 18520, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Nicole Suarez\" ) " }, { "id": 18521, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Walter Bell\" order by transaction_date limit 1" }, { "id": 18522, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Marissa Anderson\" and transaction_type = 'invoice'" }, { "id": 18523, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Megan West\" and transaction_type = 'invoice'" }, { "id": 18524, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Coal Power generation\") 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') " }, { "id": 18525, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 18526, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 18527, "SQL": "select transaction_date 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 = \"Cleaning\" order by transaction_date asc limit 1 " }, { "id": 18528, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Emily Sanchez\" ) " }, { "id": 18529, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Casey Carlson\" ) " }, { "id": 18530, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Julie Davies\" ) " }, { "id": 18531, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Robert Myers\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 18532, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 18533, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 18534, "SQL": "select min(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 = \"Stephanie Cole\" and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 18535, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Rebecca Baxter' or vendor = 'Rebecca Baxter'" }, { "id": 18536, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Repairing locomotives and railcars (except factory conversion, overhaul and rebuilding)\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 18537, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jennifer George\" ) " }, { "id": 18538, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Bradley Lloyd\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 18539, "SQL": "select transaction_id from master_txn_table where product_service = \"Biomass electricity\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 18540, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') group by billing_city" }, { "id": 18541, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Lindsay Whitehead\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 18542, "SQL": "select transaction_date from master_txn_table where customers = \"Christy Carter\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 18543, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Shawn Smith\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 18544, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Penny Jenkins\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) )" }, { "id": 18545, "SQL": "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,\"Street vending locations\") and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 18546, "SQL": "select min(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 = \"Travis Williamson\" and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 18547, "SQL": "select transaction_date from master_txn_table where customers = \"Tiffany Pratt\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 18548, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jennifer Washington\" ) " }, { "id": 18549, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 18550, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Brokerage\" " }, { "id": 18551, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Martin King\" ) " }, { "id": 18552, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 18553, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 18554, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Street vending locations\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 18555, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Tracie Murray\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') ) " }, { "id": 18556, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Bridget Browning\" ) " }, { "id": 18557, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 18558, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Amber Lewis\" ) " }, { "id": 18559, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") order by sum(debit) desc limit 1" }, { "id": 18560, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 18561, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 18562, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Baby clothing and footwear\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 18563, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Sabrina Rodriguez\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 18564, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 18565, "SQL": "select transaction_date from master_txn_table where customers = \"Rebecca Bryant\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 18566, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 18567, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Eileen Moore\" ) " }, { "id": 18568, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 18569, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Amy Holland\"" }, { "id": 18570, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Raymond Cole\" order by transaction_date limit 1" }, { "id": 18571, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"James Simpson\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 18572, "SQL": "select transaction_id from master_txn_table where product_service = \"Chairs\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 18573, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 18574, "SQL": "select product_service, 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 transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') group by product_service order by sum(credit) desc limit 1" }, { "id": 18575, "SQL": "select avg(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 = \"Karen Bentley\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 18576, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brittany Matthews\" ) " }, { "id": 18577, "SQL": "select sum(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Equity Market Neutral\" " }, { "id": 18578, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 18579, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Stacie Benson\" order by transaction_date limit 1" }, { "id": 18580, "SQL": "select avg(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 = \"Melinda Walsh\" and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 18581, "SQL": "select transaction_id from master_txn_table where customers = \"Crystal Wu\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 18582, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Timothy Stark\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) ) " }, { "id": 18583, "SQL": "select transaction_id from master_txn_table where customers = \"Justin Allen\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 18584, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 18585, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Development of other voice and speech recognition products\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 18586, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 18587, "SQL": "select transaction_id from master_txn_table where product_service = \"Golf Instructions\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 18588, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Pamela Acevedo\" ) " }, { "id": 18589, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 18590, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Wendy Oneill\"" }, { "id": 18591, "SQL": "select transaction_id from master_txn_table where customers = \"Amanda Mitchell\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 18592, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jeffrey Barrett\" ) " }, { "id": 18593, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 18594, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Robin Brown\" ) " }, { "id": 18595, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"John Morris\"" }, { "id": 18596, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Dawn Williams\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 18597, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Travis Zuniga\" ) " }, { "id": 18598, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Melissa Oliver\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') ) " }, { "id": 18599, "SQL": "select sum(credit) from master_txn_table where product_service = \"Oil field Machinery\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 18600, "SQL": "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\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 18601, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Rebecca Dawson\" ) " }, { "id": 18602, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 18603, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Tiffany Osborne\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 18604, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Thomas Ramirez\"" }, { "id": 18605, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Eric Gomez\" order by transaction_date limit 1" }, { "id": 18606, "SQL": "select transaction_id from master_txn_table where product_service = \"Construction Projects\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 18607, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Todd Bradley\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') ) " }, { "id": 18608, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 18609, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Alison Salazar\" ) " }, { "id": 18610, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Susan Sullivan\" order by transaction_date limit 1" }, { "id": 18611, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and 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') " }, { "id": 18612, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Veronica Bailey\" ) " }, { "id": 18613, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Building Repairs\") and vendor = \"Tabitha Brown\"" }, { "id": 18614, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Megan Willis\" and transaction_type = 'invoice'" }, { "id": 18615, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Providing personal care\") and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 18616, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Sally Gentry\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 18617, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') group by billing_city" }, { "id": 18618, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) group by billing_city" }, { "id": 18619, "SQL": "select transaction_date from master_txn_table where customers = \"Amanda Decker\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 18620, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Dawn Robinson\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 18621, "SQL": "select transaction_id from master_txn_table where product_service = \"Cleaning\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 18622, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Chairs\" " }, { "id": 18623, "SQL": "select transaction_id from master_txn_table where customers = \"Elizabeth Martinez\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 18624, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 18625, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Jonathan Richard\"" }, { "id": 18626, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') group by billing_city" }, { "id": 18627, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 18628, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Trevor Reed\" and account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 18629, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"John Stafford\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) )" }, { "id": 18630, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Jerry Williams\"" }, { "id": 18631, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jesse Martin\" ) " }, { "id": 18632, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Tanker rental or leasing\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 18633, "SQL": "select transaction_id from master_txn_table where product_service = \"Tanker\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 18634, "SQL": "select transaction_id from master_txn_table where customers = \"Eric Wiley\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 18635, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by billing_city" }, { "id": 18636, "SQL": "select transaction_date 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 = \"Coal Pwer\" order by transaction_date asc limit 1 " }, { "id": 18637, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Tara Stephens\" ) " }, { "id": 18638, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Leslie Gonzalez\" ) " }, { "id": 18639, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Walter Miles\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) )" }, { "id": 18640, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Craig Johnson\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 18641, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 18642, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 18643, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) group by billing_city" }, { "id": 18644, "SQL": "select transaction_id from master_txn_table where customers = \"Paula Green DDS\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 18645, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Seth Lambert\" and transaction_type = 'invoice'" }, { "id": 18646, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Michelle Ibarra\" and transaction_type = 'invoice'" }, { "id": 18647, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 18648, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Timothy Lee\" order by transaction_date limit 1" }, { "id": 18649, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 18650, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Thomas Graham\" ) " }, { "id": 18651, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 18652, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Justin Nguyen\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 18653, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 18654, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Ann Harrell\" order by transaction_date limit 1" }, { "id": 18655, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Jack Nash\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') ) " }, { "id": 18656, "SQL": "select transaction_date 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 = \"Securities\" order by transaction_date asc limit 1 " }, { "id": 18657, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Shannon Ryan\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) ) " }, { "id": 18658, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 18659, "SQL": "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 construction activities\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 18660, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 18661, "SQL": "select sum(credit) from master_txn_table where product_service = \"Care-planning\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 18662, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Cindy Hale\" ) " }, { "id": 18663, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Christian Hogan\" ) " }, { "id": 18664, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Lisa Mann' or vendor = 'Lisa Mann'" }, { "id": 18665, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 18666, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 18667, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 18668, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Chimney sweep services\" " }, { "id": 18669, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Teresa Cardenas\" ) " }, { "id": 18670, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Andre Stevens\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') ) " }, { "id": 18671, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Beverly Flynn\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) )" }, { "id": 18672, "SQL": "select transaction_id from master_txn_table where customers = \"Stacey Bailey\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 18673, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Wholesaling aeronautical equipment and supplies\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 18674, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Manuel Sharp\" ) " }, { "id": 18675, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Bryan Schneider\" ) " }, { "id": 18676, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Katherine Flores\" ) " }, { "id": 18677, "SQL": "select transaction_id from master_txn_table where customers = \"Katherine Gordon\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 18678, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Jeffery Caldwell\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 18679, "SQL": "select transaction_id from master_txn_table where product_service = \"Construction Projects\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 18680, "SQL": "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 financing related to securities\") and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 18681, "SQL": "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 industrial organic gases\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 18682, "SQL": "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,\"Retailing entertainment furniture\") and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 18683, "SQL": "select transaction_id from master_txn_table where product_service = \"Computer Programming\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 18684, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Sandra Sanchez\" order by transaction_date limit 1" }, { "id": 18685, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 18686, "SQL": "select transaction_date from master_txn_table where customers = \"Sonya Mitchell\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 18687, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by billing_city" }, { "id": 18688, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Natasha Gibbs\" ) " }, { "id": 18689, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 18690, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"William Howell\" order by transaction_date limit 1" }, { "id": 18691, "SQL": "select sum(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Leveling and Trimming\" " }, { "id": 18692, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Thomas James\" order by transaction_date limit 1" }, { "id": 18693, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jeffery Lang\" ) " }, { "id": 18694, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Amy Mendez\" order by transaction_date limit 1" }, { "id": 18695, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 18696, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 18697, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 18698, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Elizabeth Gutierrez\" ) " }, { "id": 18699, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Stephen Obrien\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) )" }, { "id": 18700, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Data entry\" " }, { "id": 18701, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Dustin Archer\" and account_type in ('Expense','Other Expense') 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') " }, { "id": 18702, "SQL": "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,\"Dance performances\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 18703, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Kristin Cortez\" order by transaction_date limit 1" }, { "id": 18704, "SQL": "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,\"Party favors\") and 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') " }, { "id": 18705, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 18706, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Paula Simmons\" order by transaction_date limit 1" }, { "id": 18707, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 18708, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name 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 account_type in ('Expense','Other Expense') " }, { "id": 18709, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 18710, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Brooke Ochoa\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') )" }, { "id": 18711, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jennifer Andersen\" order by transaction_date limit 1" }, { "id": 18712, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jody Mitchell\" order by transaction_date limit 1" }, { "id": 18713, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 18714, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Snow removal services\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 18715, "SQL": "select transaction_id from master_txn_table where product_service = \"Nursing and health\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 18716, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Mining machinery and equipment rental or leasing\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 18717, "SQL": "select transaction_date 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 = \"Equity long bias\" order by transaction_date asc limit 1 " }, { "id": 18718, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounting\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 18719, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 18720, "SQL": "select transaction_id from master_txn_table where customers = \"Alisha Orozco\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 18721, "SQL": "select transaction_date from master_txn_table where customers = \"Mary Manning\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 18722, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 18723, "SQL": "select transaction_id from master_txn_table where customers = \"Lori Gordon\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 18724, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Thomas Bright\" ) " }, { "id": 18725, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 18726, "SQL": "select min(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 = \"Morgan Chaney\" and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 18727, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Charles Stone\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 18728, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') group by billing_city" }, { "id": 18729, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Ryan Boyer\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") )" }, { "id": 18730, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Becky Fletcher\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 18731, "SQL": "select transaction_date from master_txn_table where customers = \"Melissa Swanson\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 18732, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 18733, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Boat, ship and steamship rental or leasing\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 18734, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by billing_city" }, { "id": 18735, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') group by billing_city" }, { "id": 18736, "SQL": "select transaction_date from master_txn_table where customers = \"Katherine Ward\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 18737, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Katrina Holloway\" ) " }, { "id": 18738, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jeffrey Zamora\" ) " }, { "id": 18739, "SQL": "select transaction_date 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 = \"Inorganic Gases\" order by transaction_date asc limit 1 " }, { "id": 18740, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Matthew Kennedy' or vendor = 'Matthew Kennedy'" }, { "id": 18741, "SQL": "select transaction_id from master_txn_table where product_service = \"Web hosting\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 18742, "SQL": "select min(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 = \"Robert Austin\" and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 18743, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Youth guidance services\") and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 18744, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Bianca Brown\" ) " }, { "id": 18745, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Daily living assistance\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 18746, "SQL": "select transaction_date 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 = \"Cementing walls\" order by transaction_date asc limit 1 " }, { "id": 18747, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sarah Hinton\" ) " }, { "id": 18748, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 18749, "SQL": "select transaction_date 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 = \"License fees\" order by transaction_date asc limit 1 " }, { "id": 18750, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Labor\") and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 18751, "SQL": "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\") 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') " }, { "id": 18752, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jennifer Wong\" ) " }, { "id": 18753, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Brittany Davidson' or vendor = 'Brittany Davidson'" }, { "id": 18754, "SQL": "select transaction_date from master_txn_table where customers = \"Cristian Ward\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 18755, "SQL": "select transaction_id from master_txn_table where customers = \"Denise Woods\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 18756, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Home-care Service\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 18757, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Tara Baldwin\" ) " }, { "id": 18758, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"James Lee\" ) " }, { "id": 18759, "SQL": "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,\"Application service provisioning\") and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 18760, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Nathaniel Riley\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 18761, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 18762, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 18763, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Deborah Williams\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) )" }, { "id": 18764, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Mark Rice\" ) " }, { "id": 18765, "SQL": "select transaction_date from master_txn_table where customers = \"Jordan Cox\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 18766, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 18767, "SQL": "select sum(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Clothing and footwear\" " }, { "id": 18768, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Jacob Salinas\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 18769, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jordan Jackson\" and transaction_type = 'invoice'" }, { "id": 18770, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Loretta Gallegos\" ) " }, { "id": 18771, "SQL": "select sum(credit) from master_txn_table where product_service = \"Financial\" and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 18772, "SQL": "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,\"Retailing stationary sofas/sofa-sleepers\") and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 18773, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 18774, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 18775, "SQL": "select transaction_date from master_txn_table where customers = \"Rose Martinez\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 18776, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Anne Hernandez\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 18777, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Mckenzie Jenkins\" and transaction_type = 'invoice'" }, { "id": 18778, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Christopher Boyle\" ) " }, { "id": 18779, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jennifer Bonilla\" and transaction_type = 'invoice'" }, { "id": 18780, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Miguel Allen\"" }, { "id": 18781, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Dennis Ross\" ) " }, { "id": 18782, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 18783, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 18784, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Richard Wells\" ) " }, { "id": 18785, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jennifer Fitzgerald\" order by transaction_date limit 1" }, { "id": 18786, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 18787, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Amanda Garza MD\" and account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 18788, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Carrie Gray\" ) " }, { "id": 18789, "SQL": "select product_service, 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 transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') group by product_service order by sum(credit) desc limit 1" }, { "id": 18790, "SQL": "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,\"Ceremony & reception venue\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 18791, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Teresa Sanders\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 18792, "SQL": "select transaction_date from master_txn_table where customers = \"Hunter Edwards\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 18793, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Job Expenses\") and vendor = \"Wendy Curtis\"" }, { "id": 18794, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Kari Wilson\" and transaction_type = 'invoice'" }, { "id": 18795, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Tracy Sawyer\" ) " }, { "id": 18796, "SQL": "select transaction_date from master_txn_table where customers = \"Brian Ward\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 18797, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jennifer Reese\" ) " }, { "id": 18798, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 18799, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Timothy Rivera\" ) " }, { "id": 18800, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kimberly Mcclain\" ) " }, { "id": 18801, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 18802, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Arthur Chapman\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') ) " }, { "id": 18803, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Joseph Russo\" ) " }, { "id": 18804, "SQL": "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 navigational instruments (except electronic)\") and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 18805, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Evelyn Jackson\" and transaction_type = 'payment' 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') ) " }, { "id": 18806, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jennifer Jefferson\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 18807, "SQL": "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 = \"Wanda Watson\" and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 18808, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Holly Rogers\" order by transaction_date limit 1" }, { "id": 18809, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 18810, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Shelia Ramirez\" order by transaction_date limit 1" }, { "id": 18811, "SQL": "select transaction_date from master_txn_table where customers = \"Hannah Lynn\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 18812, "SQL": "select transaction_id from master_txn_table where product_service = \"Boat\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 18813, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Carrie Lang\" ) " }, { "id": 18814, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 18815, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') group by billing_city" }, { "id": 18816, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounting\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 18817, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Marissa Lam\" order by transaction_date limit 1" }, { "id": 18818, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Jennifer Maynard\"" }, { "id": 18819, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by billing_city" }, { "id": 18820, "SQL": "select transaction_id from master_txn_table where product_service = \"Party favors\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 18821, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jenna Pratt\" ) " }, { "id": 18822, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Medication dispensing\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 18823, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 18824, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jesus Meyer\" ) " }, { "id": 18825, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Miranda Martin\" ) " }, { "id": 18826, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Connie Hughes\" order by transaction_date limit 1" }, { "id": 18827, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Sarah Lawrence\" and transaction_type = 'invoice'" }, { "id": 18828, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Coffee and Snack\" " }, { "id": 18829, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Shawn Thomas\" ) " }, { "id": 18830, "SQL": "select transaction_date from master_txn_table where customers = \"Gene Dennis\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 18831, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 18832, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"William Frazier\" ) " }, { "id": 18833, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Edward Adams\"" }, { "id": 18834, "SQL": "select transaction_id from master_txn_table where customers = \"Shawn Mcgrath\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 18835, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Travel Meals\") and vendor = \"Marie Nelson\"" }, { "id": 18836, "SQL": "select transaction_id from master_txn_table where customers = \"Lisa Andrews\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 18837, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Leslie Herrera' or vendor = 'Leslie Herrera'" }, { "id": 18838, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date) AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 18839, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 18840, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Courtney Jackson\" and transaction_type = 'invoice'" }, { "id": 18841, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Linda Reynolds\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) )" }, { "id": 18842, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') group by billing_city" }, { "id": 18843, "SQL": "select transaction_id from master_txn_table where customers = \"Tanya Rodgers\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 18844, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"John Adams\" ) " }, { "id": 18845, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Emily Vargas\" order by transaction_date limit 1" }, { "id": 18846, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 18847, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 18848, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Lori Wolfe\"" }, { "id": 18849, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 18850, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"John Medina\" and transaction_type = 'invoice'" }, { "id": 18851, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Matthew Guerra\"" }, { "id": 18852, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Rose Robertson' or vendor = 'Rose Robertson'" }, { "id": 18853, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Kelly Strickland\"" }, { "id": 18854, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Manufacturing peppermint oil\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 18855, "SQL": "select transaction_date from master_txn_table where customers = \"Ashley Watts\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 18856, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') group by billing_city" }, { "id": 18857, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 18858, "SQL": "select transaction_date from master_txn_table where customers = \"Juan Silva\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 18859, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Boat\" " }, { "id": 18860, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Andrew Boyd\"" }, { "id": 18861, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Ryan Jenkins\" order by transaction_date limit 1" }, { "id": 18862, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Wood- and wood waste-fueled power generation\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 18863, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Samuel Lloyd\"" }, { "id": 18864, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Jacqueline Carroll' or vendor = 'Jacqueline Carroll'" }, { "id": 18865, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 18866, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Joshua Meyer\" ) " }, { "id": 18867, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Gary Colon\" ) " }, { "id": 18868, "SQL": "select transaction_date from master_txn_table where customers = \"Natalie Arnold\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 18869, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Christopher Hoffman' or vendor = 'Christopher Hoffman'" }, { "id": 18870, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Crystal Franco\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') ) " }, { "id": 18871, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Pool maintenance\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 18872, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Natasha Coleman\" ) " }, { "id": 18873, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Madison Walker\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 18874, "SQL": "select transaction_date from master_txn_table where customers = \"Sharon Moore\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 18875, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Food & drink\") and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 18876, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Decks and Patios\") and vendor = \"Matthew Adams\"" }, { "id": 18877, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') group by billing_city" }, { "id": 18878, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Unapplied Cash Bill Payment Expense\") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 18879, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 18880, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by billing_city" }, { "id": 18881, "SQL": "select transaction_id from master_txn_table where product_service = \"Installation\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 18882, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Charles Hernandez' or vendor = 'Charles Hernandez'" }, { "id": 18883, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"John Moreno\" ) " }, { "id": 18884, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') order by sum(debit) desc limit 1" }, { "id": 18885, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 18886, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Contracts\" " }, { "id": 18887, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Advertising\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 18888, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Robin Hammond\" order by transaction_date limit 1" }, { "id": 18889, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Elizabeth Herrera\"" }, { "id": 18890, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 18891, "SQL": "select transaction_id from master_txn_table where customers = \"Seth Petersen\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 18892, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Lauren Shelton\"" }, { "id": 18893, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Trevor Williams\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 18894, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date) AND date(current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 18895, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Sonya Contreras\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) ) " }, { "id": 18896, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Stephanie Powers\" ) " }, { "id": 18897, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Rachel Fitzgerald\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 18898, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Dairy\" " }, { "id": 18899, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Cassandra Willis\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 18900, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Karen Rivera\" order by transaction_date limit 1" }, { "id": 18901, "SQL": "select transaction_id from master_txn_table where product_service = \"Miscellaneous\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 18902, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 18903, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Brandon Koch\" and account_type in ('Expense','Other Expense') 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') " }, { "id": 18904, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Jasmine Parrish\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 18905, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Photography\") and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 18906, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 18907, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 18908, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 18909, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Flowers\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 18910, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jack May\" ) " }, { "id": 18911, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Maria Young\"" }, { "id": 18912, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Providing shunting trailers in rail terminals\") 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') " }, { "id": 18913, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 18914, "SQL": "select sum(credit) from master_txn_table where product_service = \"Web hosting\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 18915, "SQL": "select transaction_date 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 = \"Entertainment\" order by transaction_date asc limit 1 " }, { "id": 18916, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Melissa Mccann\"" }, { "id": 18917, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Scott Larson\" ) " }, { "id": 18918, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Andrea Gonzalez\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 18919, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 18920, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Elizabeth Stewart\" ) " }, { "id": 18921, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Coordinators\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 18922, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 18923, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 18924, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Unapplied Cash Payment Income\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 18925, "SQL": "select transaction_date from master_txn_table where customers = \"Joseph Anderson\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 18926, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Robert Harvey\" and transaction_type = 'invoice'" }, { "id": 18927, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Fuel\") and vendor = \"Michael Dean\"" }, { "id": 18928, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Alexandria Reyes\" ) " }, { "id": 18929, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Morgan Myers\" and transaction_type = 'invoice'" }, { "id": 18930, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"James Curry\"" }, { "id": 18931, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Teresa Olsen\" order by transaction_date limit 1" }, { "id": 18932, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by billing_city" }, { "id": 18933, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brian Everett\" ) " }, { "id": 18934, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Randy Blankenship\" order by transaction_date limit 1" }, { "id": 18935, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 18936, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Teresa Kennedy\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 18937, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 18938, "SQL": "select max(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 = \"Thomas Hatfield\" and 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') " }, { "id": 18939, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Nancy Bell\" order by transaction_date limit 1" }, { "id": 18940, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Candace Brown' or vendor = 'Candace Brown'" }, { "id": 18941, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Lisa Perez\" order by transaction_date limit 1" }, { "id": 18942, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 18943, "SQL": "select transaction_date from master_txn_table where customers = \"Kelly Bryan\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 18944, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Intravenous therapy\") 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') " }, { "id": 18945, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 18946, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Hannah Lynn\" ) " }, { "id": 18947, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 18948, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 18949, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Heather Smith\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') ) " }, { "id": 18950, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Brittany Brown\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 18951, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Regina Wilson' or vendor = 'Regina Wilson'" }, { "id": 18952, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Manufacturing lemon oil\") and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 18953, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Adam Rich\" ) " }, { "id": 18954, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jack Hoover\" ) " }, { "id": 18955, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Amber Fletcher\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') )" }, { "id": 18956, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 18957, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Kimberly Gonzalez\"" }, { "id": 18958, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 18959, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Quality management assessment\") and 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') " }, { "id": 18960, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Megan Richards\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 18961, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Debra Gardner\"" }, { "id": 18962, "SQL": "select transaction_id from master_txn_table where product_service = \"Motorbike\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 18963, "SQL": "select sum(credit) from master_txn_table where product_service = \"Environmental impact assessment\" and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 18964, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Joe Clayton\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 18965, "SQL": "select max(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 = \"Patrick Tran IV\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 18966, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Cody Mason\" order by transaction_date limit 1" }, { "id": 18967, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Samantha Becker\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) )" }, { "id": 18968, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Courtney Munoz\" ) " }, { "id": 18969, "SQL": "select transaction_date from master_txn_table where customers = \"Walter Boyd\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 18970, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Pamela Robinson\"" }, { "id": 18971, "SQL": "select transaction_date from master_txn_table where customers = \"Emily Brown\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 18972, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Tami Payne\" order by transaction_date limit 1" }, { "id": 18973, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Data entry services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 18974, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jasmine Duffy\" ) " }, { "id": 18975, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 18976, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 18977, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 18978, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Services\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 18979, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Autumn Mckenzie\" order by transaction_date limit 1" }, { "id": 18980, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Brian Payne\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 18981, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Tammie Rivera\" and transaction_type = 'invoice'" }, { "id": 18982, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Promotional\") and vendor = \"Selena Thomas\"" }, { "id": 18983, "SQL": "select sum(credit) from master_txn_table where product_service = \"Therapy\" and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 18984, "SQL": "select min(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 = \"Rodney Alvarado\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 18985, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Molly Harmon\"" }, { "id": 18986, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Melissa Fitzgerald\" order by transaction_date limit 1" }, { "id": 18987, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"William Schaefer\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 18988, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 18989, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Brittany Larson\"" }, { "id": 18990, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Travel Meals\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 18991, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Mark Gibbs\" and transaction_type = 'invoice'" }, { "id": 18992, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Peter Avery\" ) " }, { "id": 18993, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Job Expenses\") and vendor = \"Jill Stout\"" }, { "id": 18994, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') group by billing_city" }, { "id": 18995, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Melissa Rodriguez\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 18996, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Carbon dioxide\" " }, { "id": 18997, "SQL": "select transaction_date from master_txn_table where customers = \"Rebecca Bond\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 18998, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 18999, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 19000, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Rickey Munoz\" ) " }, { "id": 19001, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 19002, "SQL": "select transaction_date from master_txn_table where customers = \"Nina Clayton\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 19003, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 19004, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brittany Ibarra\" ) " }, { "id": 19005, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Melissa Williams\" ) " }, { "id": 19006, "SQL": "select sum(credit) from master_txn_table where product_service = \"Railroad terminals\" and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 19007, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Grace Davis\" ) " }, { "id": 19008, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Robin Ramirez\" order by transaction_date limit 1" }, { "id": 19009, "SQL": "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,\"Physical therapy\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 19010, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Telephone\") and vendor = \"Donald Forbes\"" }, { "id": 19011, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Isaiah Gordon\" ) " }, { "id": 19012, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 19013, "SQL": "select transaction_id from master_txn_table where customers = \"Benjamin Martinez\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 19014, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Karl Juarez\" ) " }, { "id": 19015, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 19016, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 19017, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Equipment Repairs\") and vendor = \"Tim Johnson\"" }, { "id": 19018, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Samuel Wheeler\" ) " }, { "id": 19019, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Data processing computer services\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 19020, "SQL": "select sum(credit) from master_txn_table where product_service = \"Musical\" and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 19021, "SQL": "select min(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 = \"Kevin Oliver\" and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 19022, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 19023, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 19024, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Jacqueline Anderson\"" }, { "id": 19025, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Development of software products for Tablets\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 19026, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Randall Werner\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') ) " }, { "id": 19027, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Travel\") and vendor = \"Rebecca Mueller\"" }, { "id": 19028, "SQL": "select transaction_date 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 = \"Training\" order by transaction_date asc limit 1 " }, { "id": 19029, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Aaron Conrad\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) )" }, { "id": 19030, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Elizabeth Moreno\" ) " }, { "id": 19031, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Natalie Maldonado\" ) " }, { "id": 19032, "SQL": "select transaction_id from master_txn_table where customers = \"David Burns\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 19033, "SQL": "select transaction_date 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 = \"Dining\" order by transaction_date asc limit 1 " }, { "id": 19034, "SQL": "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,\"Fees Billed\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 19035, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Julie Moreno DDS\" and transaction_type = 'payment' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') ) " }, { "id": 19036, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Susan Mccormick DVM\" ) " }, { "id": 19037, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Process management\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 19038, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Children and youth recreational programs\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 19039, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Geothermal-fueled power generation\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 19040, "SQL": "select transaction_date 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 = \"Photography\" order by transaction_date asc limit 1 " }, { "id": 19041, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 19042, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 19043, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Monica Wang\" ) " }, { "id": 19044, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and 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') group by billing_city" }, { "id": 19045, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 19046, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lisa Carter\" ) " }, { "id": 19047, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Daniel Flynn\" and transaction_type = 'payment' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') )" }, { "id": 19048, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Gregory Drake\" ) " }, { "id": 19049, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 19050, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Elizabeth Mccall\" ) " }, { "id": 19051, "SQL": "select max(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 = \"Zachary Herman\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 19052, "SQL": "select transaction_date from master_txn_table where customers = \"Helen Newton\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 19053, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jessica Guerrero\" and transaction_type = 'invoice'" }, { "id": 19054, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Dues & Subscriptions\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 19055, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') group by billing_city" }, { "id": 19056, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 19057, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Rachel Henderson\" ) " }, { "id": 19058, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Mike Smith\" ) " }, { "id": 19059, "SQL": "select transaction_id from master_txn_table where product_service = \"Food\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 19060, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 19061, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 19062, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Angela Escobar\" ) " }, { "id": 19063, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Anthony Arnold\" ) " }, { "id": 19064, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Lindsey Moore\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 19065, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Hector Neal\" ) " }, { "id": 19066, "SQL": "select transaction_date from master_txn_table where customers = \"Brian Jackson\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 19067, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Gabriel Stanley\" ) " }, { "id": 19068, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') group by billing_city" }, { "id": 19069, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Accounting\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 19070, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 19071, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 19072, "SQL": "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,\"Development of software products for automobiles\") and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 19073, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Ashley Powell\" and transaction_type = 'invoice'" }, { "id": 19074, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Terri Phillips\" ) " }, { "id": 19075, "SQL": "select transaction_id from master_txn_table where customers = \"Shane Kent\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 19076, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Olivia Williams\"" }, { "id": 19077, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 19078, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Emily Martin\" order by transaction_date limit 1" }, { "id": 19079, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Oscar Nelson\" ) " }, { "id": 19080, "SQL": "select transaction_date 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 = \"Homemaker and companion\" order by transaction_date asc limit 1 " }, { "id": 19081, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Manufacturing other Natural oils\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 19082, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Telephone\") and vendor = \"Sharon Martin\"" }, { "id": 19083, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Mark Mejia\" ) " }, { "id": 19084, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Natalie Yang\" ) " }, { "id": 19085, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kelly Rosario\" ) " }, { "id": 19086, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Social activities\") and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 19087, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Fishing supply retailing\") and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 19088, "SQL": "select transaction_id from master_txn_table where product_service = \"Golf Equipment\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 19089, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 19090, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kirsten Conley\" ) " }, { "id": 19091, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sylvia Dunlap\" ) " }, { "id": 19092, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Kendra Stevenson\" and transaction_type = 'invoice'" }, { "id": 19093, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and 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') group by billing_city" }, { "id": 19094, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Promotional\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 19095, "SQL": "select transaction_date 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 = \"--\" order by transaction_date asc limit 1 " }, { "id": 19096, "SQL": "select transaction_date 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 = \"LAN\" order by transaction_date asc limit 1 " }, { "id": 19097, "SQL": "select product_service, 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 transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') group by product_service order by sum(credit) desc limit 1" }, { "id": 19098, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 19099, "SQL": "select transaction_date from master_txn_table where customers = \"Misty Martin\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 19100, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Christopher Long\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 19101, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Anthony Sparks\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 19102, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)group by product_service order by sum(credit) desc limit 1" }, { "id": 19103, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") order by sum(debit) desc limit 1" }, { "id": 19104, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Elizabeth Avila\" ) " }, { "id": 19105, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 19106, "SQL": "select transaction_id from master_txn_table where customers = \"Courtney Bridges\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 19107, "SQL": "select transaction_id from master_txn_table where product_service = \"Wardrobe\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 19108, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"David Mason\" ) " }, { "id": 19109, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Telephone\") and vendor = \"Jeffrey Perkins\"" }, { "id": 19110, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Alan Pearson II\" ) " }, { "id": 19111, "SQL": "select sum(credit) from master_txn_table where product_service = \"Macs\" and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 19112, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') group by billing_city" }, { "id": 19113, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Patrick Camacho\" and transaction_type = 'invoice'" }, { "id": 19114, "SQL": "select transaction_date from master_txn_table where customers = \"Erin Wilson\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 19115, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Trevor Green\" ) " }, { "id": 19116, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Manufacturing industrial organic gases\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 19117, "SQL": "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,\"Ceremony & reception venue\") and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 19118, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Christopher Tran\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 19119, "SQL": "select transaction_date from master_txn_table where customers = \"Ashley Day\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 19120, "SQL": "select avg(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 = \"Brittany Savage\" and 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') " }, { "id": 19121, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Thomas Le\" ) " }, { "id": 19122, "SQL": "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 = \"Wanda Potter\" and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 19123, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 19124, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 19125, "SQL": "select transaction_date from master_txn_table where customers = \"John Rodriguez\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 19126, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Terry Cisneros' or vendor = 'Terry Cisneros'" }, { "id": 19127, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Joe Clayton\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 19128, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Adrian Espinoza\" ) " }, { "id": 19129, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Scott Bennett\" ) " }, { "id": 19130, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Purchases\") and vendor = \"David Prince\"" }, { "id": 19131, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Kelly Gray\" and transaction_type = 'invoice'" }, { "id": 19132, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Bradley Kennedy\"" }, { "id": 19133, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') group by billing_city" }, { "id": 19134, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Timothy Ward\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 19135, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Swimming pool Cleaning\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 19136, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 19137, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Alan Fernandez\" and transaction_type = 'payment' and 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') ) " }, { "id": 19138, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Timothy Beck\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 19139, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Kristin Williams' or vendor = 'Kristin Williams'" }, { "id": 19140, "SQL": "select sum(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Application Hosting\" " }, { "id": 19141, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Kristen Walker\" and transaction_type = 'invoice'" }, { "id": 19142, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 19143, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Tara Moran' or vendor = 'Tara Moran'" }, { "id": 19144, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Commissions & fees\") and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 19145, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Diapers\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 19146, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Samuel Johnson\" ) " }, { "id": 19147, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 19148, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Providing support for money management\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 19149, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 19150, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Whitney Todd\" ) " }, { "id": 19151, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 19152, "SQL": "select transaction_date 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 = \"Parking lot and driveway washing\" order by transaction_date asc limit 1 " }, { "id": 19153, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Rebecca Horn\" ) " }, { "id": 19154, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Steven Yates\" and transaction_type = 'payment' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') )" }, { "id": 19155, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and 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') " }, { "id": 19156, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 19157, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 19158, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Susan Chavez\" ) " }, { "id": 19159, "SQL": "select max(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 = \"Eric Owens\" and 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') " }, { "id": 19160, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Katie Weber\" ) " }, { "id": 19161, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jessica Murray\" ) " }, { "id": 19162, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 19163, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 19164, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Mary Hickman\" ) " }, { "id": 19165, "SQL": "select transaction_date from master_txn_table where customers = \"Janet Collins\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 19166, "SQL": "select transaction_id from master_txn_table where product_service = \"Dealing\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 19167, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 19168, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 19169, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 19170, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Daniel Lambert\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 19171, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Terry Stone' or vendor = 'Terry Stone'" }, { "id": 19172, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 19173, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 19174, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Patricia Thompson\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) ) " }, { "id": 19175, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Ivan Vargas\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 19176, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Samuel Nichols\" ) " }, { "id": 19177, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 19178, "SQL": "select transaction_date from master_txn_table where customers = \"Maria Bryant\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 19179, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 19180, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 19181, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 19182, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Jacob Boyd\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 19183, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Nancy Christensen\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) ) " }, { "id": 19184, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"John Houston\" ) " }, { "id": 19185, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Edward Kaiser\" ) " }, { "id": 19186, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 19187, "SQL": "select transaction_id from master_txn_table where customers = \"Kevin Brown\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 19188, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 19189, "SQL": "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,\"Opera performances\") and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 19190, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Brooke Mitchell' or vendor = 'Brooke Mitchell'" }, { "id": 19191, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Jacqueline Boyd\"" }, { "id": 19192, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 19193, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 19194, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 19195, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 19196, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Heather Jackson\" ) " }, { "id": 19197, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Shawn Hamilton\" ) " }, { "id": 19198, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Frederick Ashley\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 19199, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") order by sum(debit) desc limit 1" }, { "id": 19200, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jeremy Strong\"" }, { "id": 19201, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 19202, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Wholesaling marine supplies (except pleasure)\") and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 19203, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 19204, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Norma Alvarado\"" }, { "id": 19205, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Christopher Stevenson\" ) " }, { "id": 19206, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Kathryn Long MD\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') )" }, { "id": 19207, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Scott Drake\" and transaction_type = 'invoice'" }, { "id": 19208, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where 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') and account_type in ('Expense','Other Expense') " }, { "id": 19209, "SQL": "select transaction_date from master_txn_table where customers = \"Margaret Love\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 19210, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 19211, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Amanda Fisher\" order by transaction_date limit 1" }, { "id": 19212, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 19213, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 19214, "SQL": "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,\"Taxes & Licenses\") and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 19215, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 19216, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Permits\") and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 19217, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 19218, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Rachel Cruz\" ) " }, { "id": 19219, "SQL": "select transaction_id from master_txn_table where product_service = \"Wardrobe\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 19220, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Catherine Blackwell\" ) " }, { "id": 19221, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Nicholas Moore\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 19222, "SQL": "select transaction_date 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 = \"Livestock\" order by transaction_date asc limit 1 " }, { "id": 19223, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 19224, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Adam Gonzalez\" ) " }, { "id": 19225, "SQL": "select transaction_date from master_txn_table where customers = \"Donald Sherman\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 19226, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Providing classes in stenography and court reporting\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 19227, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Ronnie Zamora\" and transaction_type = 'invoice'" }, { "id": 19228, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Offering event-driven funds\") and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 19229, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 19230, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jaclyn Stephenson\" ) " }, { "id": 19231, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 19232, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 19233, "SQL": "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 = \"Yesenia Perez\" and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 19234, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jesse Lewis\" ) " }, { "id": 19235, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Rodney Garcia\"" }, { "id": 19236, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kerri Everett\" ) " }, { "id": 19237, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 19238, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 19239, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 19240, "SQL": "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 sporting goods retailing\") and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 19241, "SQL": "select sum(credit) from master_txn_table where product_service = \"Renewable-fueled\" and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 19242, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Kristina Russell\" order by transaction_date limit 1" }, { "id": 19243, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 19244, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jessica Chandler\" ) " }, { "id": 19245, "SQL": "select transaction_date 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 = \"Memberships\" order by transaction_date asc limit 1 " }, { "id": 19246, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Heidi Stevenson\" and transaction_type = 'invoice'" }, { "id": 19247, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Aircraft rental or leasing\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 19248, "SQL": "select min(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 = \"Jake Bowers\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 19249, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Tammy Mccann\"" }, { "id": 19250, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 19251, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Latasha Lewis\" ) " }, { "id": 19252, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Andrew Valdez\" ) " }, { "id": 19253, "SQL": "select transaction_date 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 = \"Fixed income\" order by transaction_date asc limit 1 " }, { "id": 19254, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Leslie Sweeney\" ) " }, { "id": 19255, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 19256, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Thomas Miller\" ) " }, { "id": 19257, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Lindsey Owens\"" }, { "id": 19258, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ronald Scott\" ) " }, { "id": 19259, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 19260, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Lauren Padilla\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 19261, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Derek Mullins\"" }, { "id": 19262, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 19263, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 19264, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Edward Butler\" and transaction_type = 'invoice'" }, { "id": 19265, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 19266, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Other Income\") and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 19267, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 19268, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Constructing apartment complexes\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 19269, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Malik Byrd\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 19270, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 19271, "SQL": "select transaction_date from master_txn_table where customers = \"Mary Rivera\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 19272, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"David Boyle\" ) " }, { "id": 19273, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 19274, "SQL": "select transaction_date from master_txn_table where customers = \"Carlos Cervantes\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 19275, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 19276, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 19277, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Danielle Reyes\" ) " }, { "id": 19278, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 19279, "SQL": "select transaction_date from master_txn_table where customers = \"Scott Vaughn PhD\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 19280, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Catherine Miller\" ) " }, { "id": 19281, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Douglas Nelson\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 19282, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Stephen Wood\"" }, { "id": 19283, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Tara Goodwin\"" }, { "id": 19284, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Gary Jimenez\" ) " }, { "id": 19285, "SQL": "select transaction_date 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 = \"Business management\" order by transaction_date asc limit 1 " }, { "id": 19286, "SQL": "select transaction_date from master_txn_table where customers = \"Stephanie Casey\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 19287, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 19288, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Toni Johnson\" ) " }, { "id": 19289, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Javier Peters\"" }, { "id": 19290, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 19291, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' 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') " }, { "id": 19292, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 19293, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jeff Crawford\" ) " }, { "id": 19294, "SQL": "select transaction_id from master_txn_table where product_service = \"Data entry\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 19295, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Event-driven\" " }, { "id": 19296, "SQL": "select transaction_date from master_txn_table where customers = \"Andrea Turner\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 19297, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Joshua Kim\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 19298, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Monique Hamilton\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 19299, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jennifer Flores\" ) " }, { "id": 19300, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Dues & Subscriptions\") and vendor = \"Thomas Smith\"" }, { "id": 19301, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Ernest Zimmerman\"" }, { "id": 19302, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Theresa Garrett\" ) " }, { "id": 19303, "SQL": "select transaction_date from master_txn_table where customers = \"Michael Brooks\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 19304, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jeffrey Serrano\" ) " }, { "id": 19305, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Katherine Good\" order by transaction_date limit 1" }, { "id": 19306, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kevin Norman\" ) " }, { "id": 19307, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Emily Kramer\" and transaction_type = 'payment' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') )" }, { "id": 19308, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Stephanie Rodriguez\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 19309, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Ryan Sweeney\" order by transaction_date limit 1" }, { "id": 19310, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Offering event-driven funds\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 19311, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jennifer Jacobs\" and transaction_type = 'invoice'" }, { "id": 19312, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Joy Washington\" ) " }, { "id": 19313, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Alexandra Davis\" ) " }, { "id": 19314, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Vincent Moran\" ) " }, { "id": 19315, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Julie Andrade\" ) " }, { "id": 19316, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Tiffany Spence\" ) " }, { "id": 19317, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Chelsea Vasquez\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 19318, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 19319, "SQL": "select transaction_date from master_txn_table where customers = \"Wendy Thomas\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 19320, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Abandoned infant assistance\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 19321, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Kristen Kim\"" }, { "id": 19322, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 19323, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Willie Hodge\" ) " }, { "id": 19324, "SQL": "select transaction_id from master_txn_table where customers = \"Jennifer Webb\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 19325, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and 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') group by billing_city" }, { "id": 19326, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Nicole Small\" order by transaction_date limit 1" }, { "id": 19327, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 19328, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Justin Olson\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') ) " }, { "id": 19329, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Tonya Manning\" ) " }, { "id": 19330, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Sleepers\" " }, { "id": 19331, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"John Watts\" ) " }, { "id": 19332, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Boarding services\") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 19333, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') group by billing_city" }, { "id": 19334, "SQL": "select min(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 = \"Keith Peck\" and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 19335, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 19336, "SQL": "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,\"Boarding services\") and 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') " }, { "id": 19337, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 19338, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Wholesaling railroad equipment and supplies\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 19339, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Deborah Mcclain MD\" order by transaction_date limit 1" }, { "id": 19340, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Alexander Fernandez\" order by transaction_date limit 1" }, { "id": 19341, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Beth Davis\" and transaction_type = 'payment' 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') )" }, { "id": 19342, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Angela Cobb\" ) " }, { "id": 19343, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Adam Rich\" order by transaction_date limit 1" }, { "id": 19344, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Sarah Fry\" and transaction_type = 'invoice'" }, { "id": 19345, "SQL": "select sum(credit) from master_txn_table where product_service = \"Diving\" and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 19346, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') group by billing_city" }, { "id": 19347, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Vincent Harrison\" ) " }, { "id": 19348, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Patricia Porter\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') )" }, { "id": 19349, "SQL": "select max(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 = \"Jacob Mcconnell\" and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 19350, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"David Martinez\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) ) " }, { "id": 19351, "SQL": "select transaction_id from master_txn_table where product_service = \"Teen outreach\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 19352, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Michelle Williams\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 19353, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Dustin Ellis\"" }, { "id": 19354, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Providing financing related to securities\") 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') " }, { "id": 19355, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Christopher Dixon\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") ) " }, { "id": 19356, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Nicole Morgan\" ) " }, { "id": 19357, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by billing_city" }, { "id": 19358, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 19359, "SQL": "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,\"Retailing formal dining furniture\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 19360, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 19361, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 19362, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Caleb Robinson\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 19363, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Rita Smith' or vendor = 'Rita Smith'" }, { "id": 19364, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Musical performances\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 19365, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") order by sum(debit) desc limit 1" }, { "id": 19366, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Wholesaling boats (except pleasure)\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 19367, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kimberly Kirk MD\" ) " }, { "id": 19368, "SQL": "select transaction_date 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 = \"Eucalyptus oil\" order by transaction_date asc limit 1 " }, { "id": 19369, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Christopher Raymond\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 19370, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Catering\" " }, { "id": 19371, "SQL": "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,\"Purchases\") and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 19372, "SQL": "select transaction_date 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 = \"Attire and accessories\" order by transaction_date asc limit 1 " }, { "id": 19373, "SQL": "select transaction_date 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 = \"Homemaker and companion\" order by transaction_date asc limit 1 " }, { "id": 19374, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Dana Davies\" and transaction_type = 'payment' 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') )" }, { "id": 19375, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Pamela Evans' or vendor = 'Pamela Evans'" }, { "id": 19376, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Michelle Hartman\" ) " }, { "id": 19377, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 19378, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 19379, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Kyle George\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 19380, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jesse Swanson\" ) " }, { "id": 19381, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Brokerage\" " }, { "id": 19382, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Julie Gill\" ) " }, { "id": 19383, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 19384, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Daniel Hebert\" ) " }, { "id": 19385, "SQL": "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,\"Biogenic municipal waste-fueled power generation\") and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 19386, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Teresa Jenkins\" ) " }, { "id": 19387, "SQL": "select avg(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 = \"Michael Hughes\" and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 19388, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 19389, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name 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 account_type in ('Expense','Other Expense') " }, { "id": 19390, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 19391, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Michele Ferguson\"" }, { "id": 19392, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 19393, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Raven Barrett\"" }, { "id": 19394, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Karen Thomas\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 19395, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Roy Jones\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) ) " }, { "id": 19396, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 19397, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Gary Freeman\" ) " }, { "id": 19398, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 19399, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 19400, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 19401, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Campground and RV park services\") and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 19402, "SQL": "select transaction_id from master_txn_table where product_service = \"Care-planning\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 19403, "SQL": "select transaction_date 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 = \"Auto mobiles\" order by transaction_date asc limit 1 " }, { "id": 19404, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Gary Martinez\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 19405, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 19406, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Cynthia Molina\" order by transaction_date limit 1" }, { "id": 19407, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Christopher Erickson\" ) " }, { "id": 19408, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Dale Anderson\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') )" }, { "id": 19409, "SQL": "select transaction_id from master_txn_table where product_service = \"Cleaning\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 19410, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Ian Johnson\" order by transaction_date limit 1" }, { "id": 19411, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Brian Carter' or vendor = 'Brian Carter'" }, { "id": 19412, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 19413, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Suzanne Cox\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 19414, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Stephanie Burke\" order by transaction_date limit 1" }, { "id": 19415, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Christopher Sherman\" ) " }, { "id": 19416, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Monica Griffith\" and account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 19417, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Caleb Gomez\" ) " }, { "id": 19418, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Bradley Sanchez\" ) " }, { "id": 19419, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Lance Newman' or vendor = 'Lance Newman'" }, { "id": 19420, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jack Ray MD\" and transaction_type = 'invoice'" }, { "id": 19421, "SQL": "select transaction_date 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 = \"Installation\" order by transaction_date asc limit 1 " }, { "id": 19422, "SQL": "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,\"Surveying wells\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 19423, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Tamara Webb\" and transaction_type = 'invoice'" }, { "id": 19424, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Mary Simpson\"" }, { "id": 19425, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Daniel Woodward\" order by transaction_date limit 1" }, { "id": 19426, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Thomas Shepard\" ) " }, { "id": 19427, "SQL": "select transaction_date from master_txn_table where customers = \"Dawn Conway\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 19428, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 19429, "SQL": "select transaction_date from master_txn_table where customers = \"Sabrina Green\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 19430, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 19431, "SQL": "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,\"Equipment Rental\") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 19432, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Gregory Pearson\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) )" }, { "id": 19433, "SQL": "select transaction_date from master_txn_table where customers = \"Melinda Walker\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 19434, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Elizabeth Rodriguez\" order by transaction_date limit 1" }, { "id": 19435, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Gifts and grants\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 19436, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lori Wilson DDS\" ) " }, { "id": 19437, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ronald Mullins\" ) " }, { "id": 19438, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Peter Page\" ) " }, { "id": 19439, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Oxygen\" " }, { "id": 19440, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Elizabeth Zhang\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 19441, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Monica Williams\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 19442, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 19443, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Dominique Perkins\" order by transaction_date limit 1" }, { "id": 19444, "SQL": "select transaction_date from master_txn_table where customers = \"Ian Aguirre\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 19445, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Emily Reilly\" order by transaction_date limit 1" }, { "id": 19446, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Tiffany Reese\" ) " }, { "id": 19447, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') group by billing_city" }, { "id": 19448, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by billing_city" }, { "id": 19449, "SQL": "select sum(credit) from master_txn_table where product_service = \"Street vendoring\" and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 19450, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Kevin Wilson\" and transaction_type = 'invoice'" }, { "id": 19451, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Veronica James\" order by transaction_date limit 1" }, { "id": 19452, "SQL": "select sum(credit) from master_txn_table where product_service = \"Youth community\" and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 19453, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 19454, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jay Reed\" ) " }, { "id": 19455, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Rebecca Nelson\" ) " }, { "id": 19456, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 19457, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Symphony performances\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 19458, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 19459, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') and account_type in ('Expense','Other Expense') " }, { "id": 19460, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 19461, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 19462, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 19463, "SQL": "select sum(credit) from master_txn_table where product_service = \"License fees\" and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 19464, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 19465, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Jacqueline Singleton\"" }, { "id": 19466, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Monica Dean\" ) " }, { "id": 19467, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Amber Mccoy\" ) " }, { "id": 19468, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 19469, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Craig Murray\" ) " }, { "id": 19470, "SQL": "select transaction_date from master_txn_table where customers = \"Alexander Grimes\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 19471, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Andrew Maddox\" ) " }, { "id": 19472, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 19473, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Manufacturing lemon oil\") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 19474, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Bank Charges\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 19475, "SQL": "select transaction_date from master_txn_table where customers = \"Cassidy Fry\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 19476, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Transportation services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 19477, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date) AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 19478, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Edward Koch\"" }, { "id": 19479, "SQL": "select transaction_date from master_txn_table where customers = \"Caleb Nelson\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 19480, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Dean Reed\" and transaction_type = 'payment' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') )" }, { "id": 19481, "SQL": "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 aeronautical equipment and supplies\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 19482, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Corey Lopez\" ) " }, { "id": 19483, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Robyn Singh\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 19484, "SQL": "select transaction_id from master_txn_table where product_service = \"Home care\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 19485, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Douglas Douglas\" ) " }, { "id": 19486, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Erin Wilson\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 19487, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") order by sum(debit) desc limit 1" }, { "id": 19488, "SQL": "select transaction_date from master_txn_table where customers = \"Frederick Stanton\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 19489, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Lauren Owens\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 19490, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Michael Fletcher\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') )" }, { "id": 19491, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Kyle Ellis\" and transaction_type = 'invoice'" }, { "id": 19492, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Morgan White\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 19493, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Julie Bray\" ) " }, { "id": 19494, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Terry Jones\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 19495, "SQL": "select transaction_date from master_txn_table where customers = \"Sabrina Avila\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 19496, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Mary Barnett' or vendor = 'Mary Barnett'" }, { "id": 19497, "SQL": "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 personal care\") and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 19498, "SQL": "select transaction_date 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 = \"Bars and Nightclubs\" order by transaction_date asc limit 1 " }, { "id": 19499, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 19500, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jessica Phillips\" ) " }, { "id": 19501, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Donald Brown\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 19502, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Preston Trujillo\" ) " }, { "id": 19503, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Hailey White\" ) " }, { "id": 19504, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Christine Adams\" ) " }, { "id": 19505, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Maintenance and Repairs\") and vendor = \"Rebecca Horne\"" }, { "id": 19506, "SQL": "select transaction_id from master_txn_table where customers = \"Jason Nelson\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 19507, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 19508, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 19509, "SQL": "select max(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 = \"Sheri Carroll\" and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 19510, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Kenneth Rodriguez' or vendor = 'Kenneth Rodriguez'" }, { "id": 19511, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and 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') order by sum(debit) desc limit 1" }, { "id": 19512, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Daniel Cochran\" and account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 19513, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 19514, "SQL": "select transaction_date 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 = \"Carriers\" order by transaction_date asc limit 1 " }, { "id": 19515, "SQL": "select max(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 = \"Jennifer Kemp\" and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 19516, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 19517, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kathleen Kennedy\" ) " }, { "id": 19518, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Robin Guerrero\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 19519, "SQL": "select transaction_date from master_txn_table where customers = \"Nicole Cannon\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 19520, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jennifer Middleton\"" }, { "id": 19521, "SQL": "select sum(credit) from master_txn_table where product_service = \"Accessories\" and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 19522, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"David Barrett\" ) " }, { "id": 19523, "SQL": "select transaction_date from master_txn_table where customers = \"Danielle Gibbs\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 19524, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 19525, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Cost of Labor\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 19526, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Kenneth Moody MD\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 19527, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 19528, "SQL": "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 peppermint oil\") and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 19529, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Megan Smith MD\"" }, { "id": 19530, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Allison Perry\"" }, { "id": 19531, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Caleb Gallagher\" ) " }, { "id": 19532, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 19533, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Mackenzie Fernandez\" order by transaction_date limit 1" }, { "id": 19534, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by billing_city" }, { "id": 19535, "SQL": "select avg(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 = \"Hunter Soto\" and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 19536, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Wendy Mason\" and transaction_type = 'invoice'" }, { "id": 19537, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Joshua Strickland\" ) " }, { "id": 19538, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Katherine James\"" }, { "id": 19539, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Holly Schwartz\" ) " }, { "id": 19540, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Fuel\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 19541, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 19542, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jason Osborn\" ) " }, { "id": 19543, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 19544, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Data storage and management services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 19545, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Joseph Bell\" order by transaction_date limit 1" }, { "id": 19546, "SQL": "select transaction_date from master_txn_table where customers = \"Nathan Rasmussen\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 19547, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 19548, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Phillip Horne\"" }, { "id": 19549, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 19550, "SQL": "select transaction_date 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 = \"Mailbox Rental\" order by transaction_date asc limit 1 " }, { "id": 19551, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 19552, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Victoria Randall\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 19553, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Dance performances\") and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 19554, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Timothy Morgan\" ) " }, { "id": 19555, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Isaiah Reyes\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') )" }, { "id": 19556, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sherry Davis\" ) " }, { "id": 19557, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kelly Parrish\" ) " }, { "id": 19558, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Gregory Booker\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') )" }, { "id": 19559, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 19560, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 19561, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Benjamin Colon\" ) " }, { "id": 19562, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Theresa Rodriguez\" ) " }, { "id": 19563, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Amber Key\" order by transaction_date limit 1" }, { "id": 19564, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Ana Thomas\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 19565, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 19566, "SQL": "select transaction_id from master_txn_table where product_service = \"Chairs\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 19567, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 19568, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Utilities\") and vendor = \"Audrey Green\"" }, { "id": 19569, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Providing grain leveling and trimming in railroad cars\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 19570, "SQL": "select transaction_id from master_txn_table where customers = \"Jeffrey Holmes\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 19571, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Alan Grant\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) ) " }, { "id": 19572, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 19573, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 19574, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Manufacturing citronella oil\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 19575, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Ashley Powell\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 19576, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Kyle Snyder PhD\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 19577, "SQL": "select transaction_date from master_txn_table where customers = \"Michelle Reed\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 19578, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Social activities\" " }, { "id": 19579, "SQL": "select transaction_id from master_txn_table where customers = \"Sean Adams\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 19580, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Window washing\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 19581, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Carol Baldwin\" ) " }, { "id": 19582, "SQL": "select transaction_date from master_txn_table where customers = \"Jodi Le\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 19583, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 19584, "SQL": "select transaction_date from master_txn_table where customers = \"Yvonne Ramos\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 19585, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date) AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 19586, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 19587, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Sheri Acevedo\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 19588, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Providing financial investment management services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 19589, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Christopher Blake\"" }, { "id": 19590, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Haley Willis\"" }, { "id": 19591, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Ashlee Hansen\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 19592, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 19593, "SQL": "select transaction_id from master_txn_table where customers = \"Melissa Mooney\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 19594, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Alyssa Barton\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 19595, "SQL": "select sum(credit) from master_txn_table where product_service = \"Motorbike\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 19596, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Heather Valentine\" and account_type in ('Expense','Other Expense') 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') " }, { "id": 19597, "SQL": "select transaction_date from master_txn_table where customers = \"Amanda Brown\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 19598, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Carlos Hayes\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 19599, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brooke Pratt\" ) " }, { "id": 19600, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Amusement and recreation services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 19601, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Angela Brooks\"" }, { "id": 19602, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Alexander Ryan\" ) " }, { "id": 19603, "SQL": "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,\"Wind Power generation\") and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 19604, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Robert Sims\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') )" }, { "id": 19605, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Darryl Johnson\" ) " }, { "id": 19606, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 19607, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Earl Reyes\" ) " }, { "id": 19608, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Russell Williams\"" }, { "id": 19609, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Hector Neal\" ) " }, { "id": 19610, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Trevor Reed\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 19611, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by billing_city" }, { "id": 19612, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Randall Lewis\" ) " }, { "id": 19613, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 19614, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Loan Payable\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 19615, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Michele Griffin\"" }, { "id": 19616, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Symphony performances\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 19617, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Andrea Fisher\" ) " }, { "id": 19618, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 19619, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Telephone\") and vendor = \"Melissa Johnson\"" }, { "id": 19620, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") order by sum(debit) desc limit 1" }, { "id": 19621, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 19622, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 19623, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 19624, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Joanne Schroeder\" ) " }, { "id": 19625, "SQL": "select transaction_date from master_txn_table where customers = \"Thomas Baker\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 19626, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Mary Faulkner\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') )" }, { "id": 19627, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 19628, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 19629, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Erin Casey\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 19630, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Timothy Bryant\" ) " }, { "id": 19631, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Samantha Levine\" ) " }, { "id": 19632, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 19633, "SQL": "select transaction_date from master_txn_table where customers = \"Peter Murray\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 19634, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Angela Blair DDS\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) )" }, { "id": 19635, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Wardrobe\" " }, { "id": 19636, "SQL": "select sum(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Meals\" " }, { "id": 19637, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Jessica Davidson\"" }, { "id": 19638, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kimberly Lopez\" ) " }, { "id": 19639, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 19640, "SQL": "select max(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 = \"Tina Warren\" and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 19641, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Children and youth recreational programs\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 19642, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Amber Nolan\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 19643, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") order by sum(debit) desc limit 1" }, { "id": 19644, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Bethany English\" ) " }, { "id": 19645, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Courtney Smith\"" }, { "id": 19646, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"David Ellis\" and transaction_type = 'invoice'" }, { "id": 19647, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Installation\") and vendor = \"Tara Goodwin\"" }, { "id": 19648, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"David Torres\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 19649, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Joshua Fisher\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 19650, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Street vending locations\") 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') " }, { "id": 19651, "SQL": "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,\"Perforating well casings\") and 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') " }, { "id": 19652, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 19653, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Victoria Gordon\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 19654, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Cost of Labor\") and vendor = \"John Hughes\"" }, { "id": 19655, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 19656, "SQL": "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,\"Telephone\") 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') " }, { "id": 19657, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Daniel Oneal MD\"" }, { "id": 19658, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ronald Fields MD\" ) " }, { "id": 19659, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 19660, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Alexander Rocha\" ) " }, { "id": 19661, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Farrier services\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 19662, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Saddlery retailing\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 19663, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Eric Jenkins\" order by transaction_date limit 1" }, { "id": 19664, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Nicole Price\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 19665, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Barbara Myers\" ) " }, { "id": 19666, "SQL": "select sum(credit) from master_txn_table where product_service = \"Games\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 19667, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brandon Love\" ) " }, { "id": 19668, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 19669, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Tammy Jefferson\" order by transaction_date limit 1" }, { "id": 19670, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 19671, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Daniel Torres\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 19672, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 19673, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Sabrina Bates\"" }, { "id": 19674, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' 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') " }, { "id": 19675, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Ethical Hacking Training\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 19676, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 19677, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Dance performances\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 19678, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 19679, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Ryan Davis\" order by transaction_date limit 1" }, { "id": 19680, "SQL": "select transaction_date from master_txn_table where customers = \"Jason Blankenship\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 19681, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 19682, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Courtney Pearson' or vendor = 'Courtney Pearson'" }, { "id": 19683, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 19684, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Alexandra Payne' or vendor = 'Alexandra Payne'" }, { "id": 19685, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and 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') " }, { "id": 19686, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Adam Harris\" ) " }, { "id": 19687, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Providing personal care\") and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 19688, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Telephone\") and vendor = \"David Warren\"" }, { "id": 19689, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 19690, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 19691, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Deborah Shaw\"" }, { "id": 19692, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Lisa Wise\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 19693, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 19694, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 19695, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Maintenance and repair work\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 19696, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Ethical Hacking Training\") 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') " }, { "id": 19697, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Karen Hernandez\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) ) " }, { "id": 19698, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kelly Meyer\" ) " }, { "id": 19699, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Daniel Martin\" ) " }, { "id": 19700, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Maureen Martinez\" ) " }, { "id": 19701, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Diane Wade\" ) " }, { "id": 19702, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 19703, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Stephanie Turner\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 19704, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Johnathan Jenkins\"" }, { "id": 19705, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Crystal Conrad\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 19706, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 19707, "SQL": "select transaction_id from master_txn_table where product_service = \"Inorganic Gases\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 19708, "SQL": "select transaction_id from master_txn_table where customers = \"Kelly Kirby\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 19709, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Taylor Williams\" and account_type in ('Expense','Other Expense') 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') " }, { "id": 19710, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 19711, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Supplies\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 19712, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Frank Howard\" ) " }, { "id": 19713, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by billing_city" }, { "id": 19714, "SQL": "select sum(credit) from master_txn_table where product_service = \"Oxygen\" and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 19715, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Anna Davis\" ) " }, { "id": 19716, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Youth guidance services\") and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 19717, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Teen outreach services\") and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 19718, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Caleb Moody\" ) " }, { "id": 19719, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Christine Martinez\"" }, { "id": 19720, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where 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') and account_type in ('Expense','Other Expense') " }, { "id": 19721, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Constructing multifamily residential\") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 19722, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'James Cisneros' or vendor = 'James Cisneros'" }, { "id": 19723, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Carla Dunn\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 19724, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) group by billing_city" }, { "id": 19725, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Stephen Taylor\" ) " }, { "id": 19726, "SQL": "select transaction_date 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 = \"Lemon oil\" order by transaction_date asc limit 1 " }, { "id": 19727, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Wayne Simmons\" order by transaction_date limit 1" }, { "id": 19728, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Jennifer Ross\" and transaction_type = 'payment' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') ) " }, { "id": 19729, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 19730, "SQL": "select distinct transaction_id from master_txn_table where customers = \"John Mcintyre\"" }, { "id": 19731, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Elizabeth Franklin\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 19732, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Tammy Lee\"" }, { "id": 19733, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Paula Robinson\" ) " }, { "id": 19734, "SQL": "select sum(credit) from master_txn_table where product_service = \"Waste-fueled\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 19735, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 19736, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Brandon Wiggins\"" }, { "id": 19737, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Dana Sexton\" and transaction_type = 'invoice'" }, { "id": 19738, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 19739, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Judith Estrada\" ) " }, { "id": 19740, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 19741, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Melissa Morales\" ) " }, { "id": 19742, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 19743, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Kayla Thompson\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) ) " }, { "id": 19744, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Retailing stationary sofas/sofa-sleepers\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 19745, "SQL": "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 food services\") and 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') " }, { "id": 19746, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Installation\") and vendor = \"Dylan Everett\"" }, { "id": 19747, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 19748, "SQL": "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,\"Registration for tournaments and matches\") and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 19749, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 19750, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Hayley Davidson\" ) " }, { "id": 19751, "SQL": "select transaction_id from master_txn_table where product_service = \"Design\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 19752, "SQL": "select sum(credit) from master_txn_table where product_service = \"Spraying\" and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 19753, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lauren Avila\" ) " }, { "id": 19754, "SQL": "select transaction_date 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 = \"Gifts and grants\" order by transaction_date asc limit 1 " }, { "id": 19755, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Jason Ewing\" and account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 19756, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Isabella Cohen\" ) " }, { "id": 19757, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 19758, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') and account_type in ('Expense','Other Expense') " }, { "id": 19759, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Elizabeth Walters\" ) " }, { "id": 19760, "SQL": "select transaction_id from master_txn_table where product_service = \"Drinking and Special Food\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 19761, "SQL": "select transaction_date 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 = \"Computer Programming\" order by transaction_date asc limit 1 " }, { "id": 19762, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Donald Wilkerson\" and transaction_type = 'invoice'" }, { "id": 19763, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 19764, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Rebecca Velez\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 19765, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jill Walton\" and transaction_type = 'invoice'" }, { "id": 19766, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Frank Roberts\" ) " }, { "id": 19767, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Mark Delacruz\" and transaction_type = 'payment' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') )" }, { "id": 19768, "SQL": "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 railroad cars\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 19769, "SQL": "select transaction_date 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 = \"Loading and unloading\" order by transaction_date asc limit 1 " }, { "id": 19770, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Pamela Warren' or vendor = 'Pamela Warren'" }, { "id": 19771, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Wholesaling navigational instruments (except electronic)\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 19772, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Cody Mitchell\" ) " }, { "id": 19773, "SQL": "select transaction_date 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 = \"Tablets\" order by transaction_date asc limit 1 " }, { "id": 19774, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Julia Morgan\" ) " }, { "id": 19775, "SQL": "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 loading and unloading services at rail terminals\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 19776, "SQL": "select sum(credit) from master_txn_table where product_service = \"Organic Gases\" and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 19777, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 19778, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Scott Schneider\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 19779, "SQL": "select transaction_date from master_txn_table where customers = \"Angela Rice\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 19780, "SQL": "select sum(credit) from master_txn_table where product_service = \"Street vendoring\" and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 19781, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 19782, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 19783, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 19784, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Sheryl Brown\"" }, { "id": 19785, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 19786, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Tamara Spencer\" ) " }, { "id": 19787, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Erica Marquez\"" }, { "id": 19788, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 19789, "SQL": "select transaction_id from master_txn_table where customers = \"Brandi Blackburn\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 19790, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 19791, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") group by billing_city" }, { "id": 19792, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Nicole Reynolds\" order by transaction_date limit 1" }, { "id": 19793, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Christine Charles\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 19794, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jose Valdez\" order by transaction_date limit 1" }, { "id": 19795, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Rick Glenn\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 19796, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Chad Lopez MD\" ) " }, { "id": 19797, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 19798, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Dues & Subscriptions\") and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 19799, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Susan Allen\"" }, { "id": 19800, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Christian Long\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date) AND date(current_date) )" }, { "id": 19801, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Randy Giles\"" }, { "id": 19802, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Janet Lyons\" ) " }, { "id": 19803, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Medication\" " }, { "id": 19804, "SQL": "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,\"Packing services for goods\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 19805, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Becky Jones\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 19806, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Wendy Phillips\" and transaction_type = 'invoice'" }, { "id": 19807, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Mary Dunn\" and transaction_type = 'payment' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') ) " }, { "id": 19808, "SQL": "select transaction_date 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 = \"Fast food\" order by transaction_date asc limit 1 " }, { "id": 19809, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Vincent Bradley\" order by transaction_date limit 1" }, { "id": 19810, "SQL": "select transaction_date from master_txn_table where customers = \"Lisa Yoder\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 19811, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 19812, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Christopher Gibbs\" ) " }, { "id": 19813, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"James Huff\" ) " }, { "id": 19814, "SQL": "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,\"Non-musical performances\") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 19815, "SQL": "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,\"Therapeutic services\") and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 19816, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Thomas Campbell\" ) " }, { "id": 19817, "SQL": "select sum(credit) from master_txn_table where product_service = \"Food\" 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') " }, { "id": 19818, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Automobile\") and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 19819, "SQL": "select min(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 = \"Toni Cunningham\" and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 19820, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Multi-strategy\" " }, { "id": 19821, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date) AND date(current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 19822, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Justin Morrison\" ) " }, { "id": 19823, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 19824, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Scott Greene\" ) " }, { "id": 19825, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 19826, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Richard Morgan\" ) " }, { "id": 19827, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Maintenance and Repair\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 19828, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jessica Gilbert\" ) " }, { "id": 19829, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Data processing\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 19830, "SQL": "select sum(credit) from master_txn_table where product_service = \"Computer Programming\" and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 19831, "SQL": "select max(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 = \"Michael Moody\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 19832, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Personal Care\" " }, { "id": 19833, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Paula Sanchez\" order by transaction_date limit 1" }, { "id": 19834, "SQL": "select sum(credit) from master_txn_table where product_service = \"Application Hosting\" and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 19835, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 19836, "SQL": "select transaction_date from master_txn_table where customers = \"Jennifer Young\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 19837, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Dalton Campbell\" ) " }, { "id": 19838, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sharon Cervantes\" ) " }, { "id": 19839, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Lawrence Johnson MD' or vendor = 'Lawrence Johnson MD'" }, { "id": 19840, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Christian Gomez\" ) " }, { "id": 19841, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Nicholas Zimmerman\"" }, { "id": 19842, "SQL": "select transaction_date 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 = \"Peppermint oil\" order by transaction_date asc limit 1 " }, { "id": 19843, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Wholesaling marine supplies (except pleasure)\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 19844, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 19845, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 19846, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Shannon Castillo\" ) " }, { "id": 19847, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Omar Robinson\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 19848, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Derrick Montes\" ) " }, { "id": 19849, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jeremiah Rodriguez\" and transaction_type = 'invoice'" }, { "id": 19850, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Stacy Graves\" ) " }, { "id": 19851, "SQL": "select max(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 = \"Peter Gilbert\" and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 19852, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Insurance\") and vendor = \"Albert Leonard\"" }, { "id": 19853, "SQL": "select transaction_id from master_txn_table where customers = \"Wanda Davis\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 19854, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') group by billing_city" }, { "id": 19855, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 19856, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 19857, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Running, cutting and pulling casings, tubes and rods\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 19858, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Allison Hudson\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 19859, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Rachel Newman\" ) " }, { "id": 19860, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Wholesaling aircraft engines and parts\") and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 19861, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Job Expenses\") and vendor = \"Tara Johnston\"" }, { "id": 19862, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 19863, "SQL": "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 financial planning services\") and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 19864, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Jeffrey Powell PhD\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') )" }, { "id": 19865, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Aaron Williamson\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 19866, "SQL": "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,\"Daily living assistance\") 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') " }, { "id": 19867, "SQL": "select min(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 = \"Gina Hernandez\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 19868, "SQL": "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,\"Golf equipment and supply retailing\") and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 19869, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brittany Rhodes\" ) " }, { "id": 19870, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Lori Elliott\" order by transaction_date limit 1" }, { "id": 19871, "SQL": "select transaction_date 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 = \"Shunting trailers\" order by transaction_date asc limit 1 " }, { "id": 19872, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 19873, "SQL": "select sum(credit) from master_txn_table where product_service = \"Youth guidance\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 19874, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Diana Floyd' or vendor = 'Diana Floyd'" }, { "id": 19875, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Scott Armstrong' or vendor = 'Scott Armstrong'" }, { "id": 19876, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 19877, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Travis Moody\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 19878, "SQL": "select transaction_date 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 = \"PCs\" order by transaction_date asc limit 1 " }, { "id": 19879, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Natalie Sullivan\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) )" }, { "id": 19880, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"James Fitzgerald\" ) " }, { "id": 19881, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 19882, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Document Copying\" " }, { "id": 19883, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Musical\" " }, { "id": 19884, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 19885, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 19886, "SQL": "select transaction_date from master_txn_table where customers = \"Kenneth Ho\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 19887, "SQL": "select max(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 = \"Allison Bean\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 19888, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 19889, "SQL": "select transaction_id from master_txn_table where customers = \"Sandra Kerr DDS\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 19890, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 19891, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Catherine Prince\" ) " }, { "id": 19892, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Quality management assessment\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 19893, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Installation\") and vendor = \"Sarah Porter\"" }, { "id": 19894, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Diapers\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 19895, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Citronella oil\" " }, { "id": 19896, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Samantha Rhodes\" order by transaction_date limit 1" }, { "id": 19897, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jaime Smith\" ) " }, { "id": 19898, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Russell Long\" ) " }, { "id": 19899, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 19900, "SQL": "select avg(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 = \"Olivia Coleman\" and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 19901, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Traci Williamson\" ) " }, { "id": 19902, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Jeremiah Frye\"" }, { "id": 19903, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Providing support services for commodity markets\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 19904, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 19905, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 19906, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Lauren Cook\" and account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 19907, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 19908, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Jennifer Cannon' or vendor = 'Jennifer Cannon'" }, { "id": 19909, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Krista Morse\" ) " }, { "id": 19910, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Automobile\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 19911, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 19912, "SQL": "select max(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 = \"Rebekah Lynch\" and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 19913, "SQL": "select avg(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 = \"Tyler Oneill\" and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 19914, "SQL": "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,\"Equipment Repairs\") and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 19915, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Diana Carter\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 19916, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') order by sum(debit) desc limit 1" }, { "id": 19917, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Retailing Wardrobe\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 19918, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 19919, "SQL": "select max(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 = \"Sandra Nguyen\" and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 19920, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Loan Payable\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 19921, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 19922, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Michele Allen\" ) " }, { "id": 19923, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Kelly Payne\" and transaction_type = 'payment' and 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') )" }, { "id": 19924, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Alexandra Fleming\" ) " }, { "id": 19925, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Business courses\" " }, { "id": 19926, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Amy Cruz\" ) " }, { "id": 19927, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Design and management services \") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 19928, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Manufacturing other Synthetic Oils\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 19929, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Michael Tate\" ) " }, { "id": 19930, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 19931, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by billing_city" }, { "id": 19932, "SQL": "select max(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 = \"Patrick Meyer\" and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 19933, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 19934, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Miguel Burns\" ) " }, { "id": 19935, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Danielle Hill\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 19936, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Cleaning\" " }, { "id": 19937, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Vanessa Stone\" ) " }, { "id": 19938, "SQL": "select transaction_date from master_txn_table where customers = \"Robert Wong\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 19939, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Joseph Young\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date) AND date(current_date) )" }, { "id": 19940, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Brandon Deleon\" order by transaction_date limit 1" }, { "id": 19941, "SQL": "select transaction_date from master_txn_table where customers = \"Shannon Stevens\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 19942, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 19943, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Dennis Cox\"" }, { "id": 19944, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kathleen Holland\" ) " }, { "id": 19945, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"William Keller\" order by transaction_date limit 1" }, { "id": 19946, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kelly Harper\" ) " }, { "id": 19947, "SQL": "select transaction_date from master_txn_table where customers = \"Alexander Robertson\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 19948, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 19949, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Taylor Gardner\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 19950, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Trevor Bishop\" ) " }, { "id": 19951, "SQL": "select min(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 = \"Tricia Thornton\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 19952, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Development of software products for Tablets\") and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 19953, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Michael Turner\" and account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 19954, "SQL": "select min(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 = \"Lacey Pham\" and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 19955, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brianna Johnson\" ) " }, { "id": 19956, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 19957, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Allison Smith\" and account_type in ('Expense','Other Expense') and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 19958, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 19959, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 19960, "SQL": "select transaction_date 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 = \"Data storage management\" order by transaction_date asc limit 1 " }, { "id": 19961, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Job Materials\") and vendor = \"Bryan Davis\"" }, { "id": 19962, "SQL": "select transaction_date from master_txn_table where customers = \"Holly Garcia\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 19963, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Erik Williams\" ) " }, { "id": 19964, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Jessica Werner\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) )" }, { "id": 19965, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Workers Compensation\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 19966, "SQL": "select min(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 = \"Tina Gutierrez\" and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 19967, "SQL": "select transaction_id from master_txn_table where customers = \"Keith Osborne\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 19968, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 19969, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Christina Holloway\" ) " }, { "id": 19970, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Nathaniel Paul\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') )" }, { "id": 19971, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') 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') group by billing_city" }, { "id": 19972, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 19973, "SQL": "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,\"Intravenous therapy\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 19974, "SQL": "select transaction_date 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 field Machinery\" order by transaction_date asc limit 1 " }, { "id": 19975, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"James Beard\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) )" }, { "id": 19976, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Edwin Oneill\"" }, { "id": 19977, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Leroy Simon\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) ) " }, { "id": 19978, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Walter Hancock\" ) " }, { "id": 19979, "SQL": "select transaction_date from master_txn_table where customers = \"Corey Obrien\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 19980, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Brian Lucas\"" }, { "id": 19981, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 19982, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Promotional\") and vendor = \"Justin Martinez\"" }, { "id": 19983, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Emma Contreras\"" }, { "id": 19984, "SQL": "select transaction_date 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 = \"Drinking and Special Food\" order by transaction_date asc limit 1 " }, { "id": 19985, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Anthony Ford\" and transaction_type = 'payment' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') ) " }, { "id": 19986, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Angela Rios\" ) " }, { "id": 19987, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jeremy Bauer\" ) " }, { "id": 19988, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 19989, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 19990, "SQL": "select transaction_id from master_txn_table where product_service = \"Software Training\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 19991, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Sonya Wilson\"" }, { "id": 19992, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Christine Rivera\" ) " }, { "id": 19993, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ian Pierce\" ) " }, { "id": 19994, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 19995, "SQL": "select transaction_id from master_txn_table where product_service = \"Foster Care\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 19996, "SQL": "select transaction_id from master_txn_table where product_service = \"Meals\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 19997, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 19998, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Musicians\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 19999, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Katherine Perez\" ) " }, { "id": 20000, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Miss Lauren Clark\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date) AND date(current_date) )" }, { "id": 20001, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Patricia Smith\" ) " }, { "id": 20002, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Chris Mcdonald\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) )" }, { "id": 20003, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by billing_city" }, { "id": 20004, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Adam Powell\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 20005, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brenda Hudson\" ) " }, { "id": 20006, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') order by sum(debit) desc limit 1" }, { "id": 20007, "SQL": "select transaction_date 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 = \"Personal Care\" order by transaction_date asc limit 1 " }, { "id": 20008, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Robert Willis\" ) " }, { "id": 20009, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 20010, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 20011, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Billy Strong\" ) " }, { "id": 20012, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 20013, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Mariah Potter\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') ) " }, { "id": 20014, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Vickie Williams\" and transaction_type = 'payment' 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') ) " }, { "id": 20015, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Jenna Evans\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) )" }, { "id": 20016, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 20017, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Paul Massey\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) ) " }, { "id": 20018, "SQL": "select transaction_date from master_txn_table where customers = \"Zachary Leach\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 20019, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 20020, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Advertising\") and vendor = \"Brendan Kennedy\"" }, { "id": 20021, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Brittany Marquez\"" }, { "id": 20022, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Coal Power generation\") and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 20023, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Other Income\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 20024, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 20025, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 20026, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Renee Valdez\" ) " }, { "id": 20027, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Laura French\" and transaction_type = 'invoice'" }, { "id": 20028, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 20029, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 20030, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 20031, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by billing_city" }, { "id": 20032, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 20033, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"David Taylor\" ) " }, { "id": 20034, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Alicia Walters\" ) " }, { "id": 20035, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 20036, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Service Provisioning\" " }, { "id": 20037, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Helen Newton\"" }, { "id": 20038, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jennifer Phillips\" order by transaction_date limit 1" }, { "id": 20039, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jose Diaz\" order by transaction_date limit 1" }, { "id": 20040, "SQL": "select transaction_date from master_txn_table where customers = \"Timothy Schwartz\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 20041, "SQL": "select min(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 = \"Nicole Collins\" and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 20042, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jason Hunt\" ) " }, { "id": 20043, "SQL": "select transaction_date from master_txn_table where customers = \"Joshua Nelson\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 20044, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Metal ore\" " }, { "id": 20045, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Telephone\") and vendor = \"Joel Lawson\"" }, { "id": 20046, "SQL": "select avg(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 = \"Joel Vega\" and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 20047, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") group by billing_city" }, { "id": 20048, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Development of software products for automobiles\") and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 20049, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Kaitlyn Rhodes\"" }, { "id": 20050, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 20051, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Registration for tournaments and matches\") and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 20052, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Stacey Kennedy\" ) " }, { "id": 20053, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Wesley Robinson\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 20054, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 20055, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Clifford Carter\"" }, { "id": 20056, "SQL": "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,\"Bowling equipment and supply retailing\") and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 20057, "SQL": "select transaction_date from master_txn_table where customers = \"William Ward\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 20058, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Suzanne Pham\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 20059, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Gordon Young\" and transaction_type = 'invoice'" }, { "id": 20060, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Amateur sports teams and club servcies\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 20061, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Whitney Mckee\" ) " }, { "id": 20062, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 20063, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jonathan Reese\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 20064, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Tonya West\" ) " }, { "id": 20065, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Child guidance services\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 20066, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Angelica Sweeney\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 20067, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jason Morgan\" ) " }, { "id": 20068, "SQL": "select sum(credit) from master_txn_table where product_service = \"Assessing product problems\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 20069, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Jessica Delgado\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 20070, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Catherine Franklin\" ) " }, { "id": 20071, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Wendy Green\" ) " }, { "id": 20072, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Supplies\") and vendor = \"Jennifer Castro\"" }, { "id": 20073, "SQL": "select transaction_date from master_txn_table where customers = \"Lisa Robinson\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 20074, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Carmen Mcdonald\" ) " }, { "id": 20075, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 20076, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 20077, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Katie Dawson\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') ) " }, { "id": 20078, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Randall Graham\"" }, { "id": 20079, "SQL": "select avg(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 = \"Deborah Fischer\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 20080, "SQL": "select distinct transaction_id from master_txn_table where customers = \"David Young\"" }, { "id": 20081, "SQL": "select transaction_id from master_txn_table where product_service = \"Golf Courses\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 20082, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 20083, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 20084, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") group by product_service order by sum(credit) desc limit 1" }, { "id": 20085, "SQL": "select transaction_date 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 = \"Youth community\" order by transaction_date asc limit 1 " }, { "id": 20086, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Tracy Walker\"" }, { "id": 20087, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') order by sum(debit) desc limit 1" }, { "id": 20088, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Katelyn Allen\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) )" }, { "id": 20089, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Derek Diaz\" order by transaction_date limit 1" }, { "id": 20090, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jill Cobb\" ) " }, { "id": 20091, "SQL": "select transaction_date 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 = \"Aeronautical Equipment\" order by transaction_date asc limit 1 " }, { "id": 20092, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Christopher Huffman\" and transaction_type = 'payment' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') ) " }, { "id": 20093, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 20094, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Nicholas Wong\"" }, { "id": 20095, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ryan Esparza\" ) " }, { "id": 20096, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Kelsey Walker\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 20097, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Paul Davis\" and transaction_type = 'invoice'" }, { "id": 20098, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lori Pineda\" ) " }, { "id": 20099, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lisa Harrison\" ) " }, { "id": 20100, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Home-care Service\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 20101, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Stephanie Farmer\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') ) " }, { "id": 20102, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Amy Henderson\" and transaction_type = 'payment' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') ) " }, { "id": 20103, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Dennis Hernandez DDS\" ) " }, { "id": 20104, "SQL": "select max(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 = \"Ryan Mcdaniel\" and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 20105, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Sandra Moody\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 20106, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Macro\" " }, { "id": 20107, "SQL": "select transaction_date from master_txn_table where customers = \"Gregory Myers\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 20108, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Gary Mendez\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) )" }, { "id": 20109, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 20110, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Nathan Russell\" ) " }, { "id": 20111, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"John Estes\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 20112, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Rachel Hall\"" }, { "id": 20113, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 20114, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Andrea Vargas\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 20115, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Michael Crawford\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 20116, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 20117, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Joseph Conley\" ) " }, { "id": 20118, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 20119, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Development of software products for mobile devices\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 20120, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Krista Walters\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 20121, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Sheri Bentley\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 20122, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Drilling oil and gas wells\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 20123, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 20124, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Appearances and speeches\" " }, { "id": 20125, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sherri Stephens\" ) " }, { "id": 20126, "SQL": "select min(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 = \"Hector Flynn\" and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 20127, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Bicycle retailing\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 20128, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Austin Nolan\" ) " }, { "id": 20129, "SQL": "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,\"Motorbike \") and 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') " }, { "id": 20130, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 20131, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Gina Campos MD\" ) " }, { "id": 20132, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Alexis Elliott\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 20133, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Benjamin Allen\" ) " }, { "id": 20134, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Ashley Mays\" order by transaction_date limit 1" }, { "id": 20135, "SQL": "select transaction_date 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 = \"environmental projects\" order by transaction_date asc limit 1 " }, { "id": 20136, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Jasmine Parrish\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 20137, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Sierra Green\" order by transaction_date limit 1" }, { "id": 20138, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Joyce Perry' or vendor = 'Joyce Perry'" }, { "id": 20139, "SQL": "select avg(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 = \"Kayla Harrison\" 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') " }, { "id": 20140, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') group by billing_city" }, { "id": 20141, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Patrick Martin\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 20142, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Taylor Willis\" ) " }, { "id": 20143, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 20144, "SQL": "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,\"Office Expenses\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 20145, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Brianna Williams\"" }, { "id": 20146, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Felicia Webster\"" }, { "id": 20147, "SQL": "select product_service, 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 transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') group by product_service order by sum(credit) desc limit 1" }, { "id": 20148, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Alexandra Gates' or vendor = 'Alexandra Gates'" }, { "id": 20149, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Joseph Gomez\"" }, { "id": 20150, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Alan Finley\" and transaction_type = 'payment' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') )" }, { "id": 20151, "SQL": "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 support services for financial\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 20152, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date) AND date(current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 20153, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)group by product_service order by sum(credit) desc limit 1" }, { "id": 20154, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Traci Williamson\"" }, { "id": 20155, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 20156, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Justin Perez\" and transaction_type = 'invoice'" }, { "id": 20157, "SQL": "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,\"Advertising\") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 20158, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Richard Rich\" ) " }, { "id": 20159, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Alex Hart' or vendor = 'Alex Hart'" }, { "id": 20160, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 20161, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 20162, "SQL": "select transaction_date from master_txn_table where customers = \"Amber Contreras\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 20163, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 20164, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 20165, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Samantha Kane\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 20166, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Karen Ramirez\" ) " }, { "id": 20167, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Kristy Wise\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) )" }, { "id": 20168, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 20169, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 20170, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 20171, "SQL": "select sum(credit) from master_txn_table where product_service = \"Business courses\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 20172, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 20173, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Dietary and nutritional services\") and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 20174, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') group by billing_city" }, { "id": 20175, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Joseph Martin\" ) " }, { "id": 20176, "SQL": "select transaction_date from master_txn_table where customers = \"John Grant\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 20177, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") order by sum(debit) desc limit 1" }, { "id": 20178, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 20179, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') 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') group by billing_city" }, { "id": 20180, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Laurie Brewer\" ) " }, { "id": 20181, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Tyler Mcmahon\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 20182, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 20183, "SQL": "select transaction_date from master_txn_table where customers = \"Wayne Weaver\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 20184, "SQL": "select sum(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Toys\" " }, { "id": 20185, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Joseph Scott\"" }, { "id": 20186, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Providing support services for financial\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 20187, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 20188, "SQL": "select transaction_id from master_txn_table where customers = \"Jane Little\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 20189, "SQL": "select transaction_date from master_txn_table where customers = \"Robin Park\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 20190, "SQL": "select sum(credit) from master_txn_table where product_service = \"Personal Care\" and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 20191, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 20192, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Natalie Fisher\" order by transaction_date limit 1" }, { "id": 20193, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Metal ore exploration\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 20194, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Antonio Terry\" ) " }, { "id": 20195, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Angela Bauer\"" }, { "id": 20196, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 20197, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Scott Boone\" ) " }, { "id": 20198, "SQL": "select transaction_date from master_txn_table where customers = \"Brett Dominguez\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 20199, "SQL": "select min(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 = \"Katherine Jennings\" and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 20200, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Johnathan Payne\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 20201, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Valerie Charles\" ) " }, { "id": 20202, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 20203, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Child guidance services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 20204, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Sean Daniels\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 20205, "SQL": "select max(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 = \"Melissa Nelson DDS\" and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 20206, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Roy Davis\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 20207, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ronald Cook\" ) " }, { "id": 20208, "SQL": "select transaction_date 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 = \"Services\" order by transaction_date asc limit 1 " }, { "id": 20209, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Tracy Lee\" order by transaction_date limit 1" }, { "id": 20210, "SQL": "select transaction_date from master_txn_table where customers = \"Jeffery Ingram\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 20211, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Anne Russell\" order by transaction_date limit 1" }, { "id": 20212, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 20213, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Christina Hancock\" ) " }, { "id": 20214, "SQL": "select max(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 = \"Jessica Barajas\" and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 20215, "SQL": "select transaction_id from master_txn_table where customers = \"Jennifer Cannon\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 20216, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Tara Johnston\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 20217, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jeffery Obrien\" and transaction_type = 'invoice'" }, { "id": 20218, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 20219, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Karen Dunlap\" ) " }, { "id": 20220, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"License fees\" " }, { "id": 20221, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Kyle Wilson\"" }, { "id": 20222, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 20223, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 20224, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Job Materials\") and vendor = \"Valerie Santiago\"" }, { "id": 20225, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Calvin Marks\" ) " }, { "id": 20226, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 20227, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 20228, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 20229, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Kristen Hill\"" }, { "id": 20230, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Ryan Valencia\" order by transaction_date limit 1" }, { "id": 20231, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 20232, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Workers Compensation\") and vendor = \"David Grant\"" }, { "id": 20233, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Utilities\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 20234, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lisa Richardson\" ) " }, { "id": 20235, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Athletic uniforms retailing\") and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 20236, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ashley Figueroa\" ) " }, { "id": 20237, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 20238, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Aircraft rental or leasing\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 20239, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Scott Dalton\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') ) " }, { "id": 20240, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Shannon Underwood\" ) " }, { "id": 20241, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Teresa Bauer' or vendor = 'Teresa Bauer'" }, { "id": 20242, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Justin Smith\" and transaction_type = 'invoice'" }, { "id": 20243, "SQL": "select distinct transaction_id from master_txn_table where customers = \"William Hendricks\"" }, { "id": 20244, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 20245, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Danielle Farmer\" order by transaction_date limit 1" }, { "id": 20246, "SQL": "select transaction_date from master_txn_table where customers = \"Hannah King\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 20247, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 20248, "SQL": "select transaction_date from master_txn_table where customers = \"Valerie Ward\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 20249, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Paul Harding\" ) " }, { "id": 20250, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Bryan Sanders\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 20251, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Emily Montoya\" and transaction_type = 'payment' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') ) " }, { "id": 20252, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Lindsay Whitehead\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 20253, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 20254, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lisa Miller DDS\" ) " }, { "id": 20255, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Wholesaling ships\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 20256, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 20257, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Dawn Robertson\" ) " }, { "id": 20258, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Retailing entertainment furniture\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 20259, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Database management\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 20260, "SQL": "select transaction_id from master_txn_table where product_service = \"Musicians\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 20261, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Katelyn Adams' or vendor = 'Katelyn Adams'" }, { "id": 20262, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where 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') and account_type in ('Expense','Other Expense') " }, { "id": 20263, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Logan Snyder\" order by transaction_date limit 1" }, { "id": 20264, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Basic office and secretarial skills training\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 20265, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"James Mccullough\" ) " }, { "id": 20266, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jessica West\" ) " }, { "id": 20267, "SQL": "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,\"Wind Power generation\") 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') " }, { "id": 20268, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 20269, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Juan Gray\" ) " }, { "id": 20270, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 20271, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Julie Stephens\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 20272, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 20273, "SQL": "select transaction_id from master_txn_table where customers = \"Sarah Rogers\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 20274, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Aaron Ayers\"" }, { "id": 20275, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Brian Hoover\"" }, { "id": 20276, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ernest Lewis\" ) " }, { "id": 20277, "SQL": "select transaction_id from master_txn_table where customers = \"Wanda Palmer\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 20278, "SQL": "select sum(credit) from master_txn_table where product_service = \"Counseling\" and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 20279, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Crystal Hendricks' or vendor = 'Crystal Hendricks'" }, { "id": 20280, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Thomas Le\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date) AND date(current_date) ) " }, { "id": 20281, "SQL": "select transaction_id from master_txn_table where customers = \"Robert Huerta\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 20282, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') order by sum(debit) desc limit 1" }, { "id": 20283, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Elizabeth Johnson\" ) " }, { "id": 20284, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 20285, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Susan Lee\" order by transaction_date limit 1" }, { "id": 20286, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by billing_city" }, { "id": 20287, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"James Bell\" order by transaction_date limit 1" }, { "id": 20288, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Dillon Hill\" ) " }, { "id": 20289, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Emily Taylor\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 20290, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 20291, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 20292, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Stephanie Logan\" order by transaction_date limit 1" }, { "id": 20293, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') group by billing_city" }, { "id": 20294, "SQL": "select transaction_id from master_txn_table where product_service = \"Duct and gutter cleaning\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 20295, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') 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') group by billing_city" }, { "id": 20296, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Anita Hansen\" ) " }, { "id": 20297, "SQL": "select transaction_date 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 = \"Inorganic Gases\" order by transaction_date asc limit 1 " }, { "id": 20298, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 20299, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Geothermal-fueled power generation\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 20300, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kaitlin Silva\" ) " }, { "id": 20301, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Nicole Farrell\"" }, { "id": 20302, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 20303, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Matthew Salinas\" ) " }, { "id": 20304, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 20305, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Robert Washington\" order by transaction_date limit 1" }, { "id": 20306, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Theresa Woods\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 20307, "SQL": "select sum(credit) from master_txn_table where product_service = \"Mailbox Rental\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 20308, "SQL": "select transaction_id from master_txn_table where customers = \"Katherine Miller\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 20309, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Manufacturing other essential oils\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 20310, "SQL": "select avg(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 = \"Frank Howard\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 20311, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 20312, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 20313, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"John Kerr\" ) " }, { "id": 20314, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 20315, "SQL": "select transaction_date from master_txn_table where customers = \"Julian Adams\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 20316, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Kristen Krause\" order by transaction_date limit 1" }, { "id": 20317, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Robert Powell\" ) " }, { "id": 20318, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') and account_type in ('Expense','Other Expense') " }, { "id": 20319, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') group by billing_city" }, { "id": 20320, "SQL": "select transaction_date from master_txn_table where customers = \"Heather Myers\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 20321, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and 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') " }, { "id": 20322, "SQL": "select product_service, 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 transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') group by product_service order by sum(credit) desc limit 1" }, { "id": 20323, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Troy Fields\" ) " }, { "id": 20324, "SQL": "select transaction_date from master_txn_table where customers = \"Carlos Lee\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 20325, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"George Smith\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 20326, "SQL": "select transaction_date from master_txn_table where customers = \"Alicia Carter\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 20327, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Robert Giles\" and transaction_type = 'invoice'" }, { "id": 20328, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') group by billing_city" }, { "id": 20329, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Mary Dixon\" ) " }, { "id": 20330, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Transportation\" " }, { "id": 20331, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Wood- and wood waste-fueled power generation\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 20332, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 20333, "SQL": "select transaction_date 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 = \"Wardrobe\" order by transaction_date asc limit 1 " }, { "id": 20334, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') 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') group by billing_city" }, { "id": 20335, "SQL": "select sum(credit) from master_txn_table where product_service = \"Social\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 20336, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Drinking and Special Food\" " }, { "id": 20337, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 20338, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Molly Kim\" ) " }, { "id": 20339, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Katie Benjamin\" ) " }, { "id": 20340, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kathryn Nguyen\" ) " }, { "id": 20341, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Leslie Armstrong\" ) " }, { "id": 20342, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 20343, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jasmine Ramos\"" }, { "id": 20344, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Constructing duplexes\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 20345, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Julia Mason\" ) " }, { "id": 20346, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Phyllis Long\" ) " }, { "id": 20347, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jennifer Blake\" ) " }, { "id": 20348, "SQL": "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 shunting trailers in rail terminals\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 20349, "SQL": "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,\"Teen outreach services\") 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') " }, { "id": 20350, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Data storage and management services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 20351, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Carol Schmidt\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 20352, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Vincent Barton\" ) " }, { "id": 20353, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 20354, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Musical performances\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 20355, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Charles Jones\" ) " }, { "id": 20356, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 20357, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brett Love\" ) " }, { "id": 20358, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sergio Reeves\" ) " }, { "id": 20359, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Bank Charges\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 20360, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 20361, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Labor\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 20362, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"James Evans\"" }, { "id": 20363, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sarah King\" ) " }, { "id": 20364, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Cementing wells\") and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 20365, "SQL": "select transaction_date from master_txn_table where customers = \"Brian Lee\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 20366, "SQL": "select distinct transaction_id from master_txn_table where customers = \"John Booth\"" }, { "id": 20367, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Baby carriers\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 20368, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Tricia Moses\"" }, { "id": 20369, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"golf equipment rental services\") and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 20370, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Devon Merritt\" ) " }, { "id": 20371, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Boat\" " }, { "id": 20372, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Ernest Lewis' or vendor = 'Ernest Lewis'" }, { "id": 20373, "SQL": "select sum(credit) from master_txn_table where product_service = \"Outdoor goods\" and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 20374, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Ryan Savage\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 20375, "SQL": "select transaction_id from master_txn_table where customers = \"Brenda Pace\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 20376, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Paige Smith' or vendor = 'Paige Smith'" }, { "id": 20377, "SQL": "select min(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 = \"Rachel Reilly\" and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 20378, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Christopher Simpson\" and transaction_type = 'payment' and 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') )" }, { "id": 20379, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') group by billing_city" }, { "id": 20380, "SQL": "select min(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 = \"Hunter Frye\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 20381, "SQL": "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,\"Taxes & Licenses\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 20382, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Boarding services\") and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 20383, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sandra Andersen\" ) " }, { "id": 20384, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Rodney Flynn\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 20385, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Todd Smith\" ) " }, { "id": 20386, "SQL": "select transaction_date 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 = \"Mining machinery\" order by transaction_date asc limit 1 " }, { "id": 20387, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Michael Cox\"" }, { "id": 20388, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Tyler Ward' or vendor = 'Tyler Ward'" }, { "id": 20389, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Bars and nightclubs\") and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 20390, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 20391, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 20392, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Ray Hughes\" and transaction_type = 'payment' 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') )" }, { "id": 20393, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Travis Johnson\" ) " }, { "id": 20394, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Charles Reid\" ) " }, { "id": 20395, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 20396, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 20397, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 20398, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Joe Clark\" order by transaction_date limit 1" }, { "id": 20399, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"David Lynn\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 20400, "SQL": "select sum(credit) from master_txn_table where product_service = \"Invitations\" and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 20401, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Dues & Subscriptions\") and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 20402, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Robyn Galloway\" ) " }, { "id": 20403, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Amy Wheeler\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') ) " }, { "id": 20404, "SQL": "select transaction_id from master_txn_table where customers = \"Kimberly Davis\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 20405, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Timothy Lewis\" ) " }, { "id": 20406, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Shannon Farley\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 20407, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Katelyn Miller\" ) " }, { "id": 20408, "SQL": "select transaction_date from master_txn_table where customers = \"Mark West\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 20409, "SQL": "select transaction_date 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 = \"Apparel and shoes\" order by transaction_date asc limit 1 " }, { "id": 20410, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 20411, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jane Bradley\" ) " }, { "id": 20412, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 20413, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 20414, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jeffrey Woods\" ) " }, { "id": 20415, "SQL": "select transaction_date from master_txn_table where customers = \"Richard Perez\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 20416, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Job Materials\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 20417, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date) AND date(current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 20418, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 20419, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 20420, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Robert Parker\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') )" }, { "id": 20421, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Project planning and economic assessments\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 20422, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Utilities\") and vendor = \"Stephen Blair\"" }, { "id": 20423, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Pam Sandoval\" ) " }, { "id": 20424, "SQL": "select transaction_id from master_txn_table where customers = \"Jill Larsen\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 20425, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Equipment Repairs\") and vendor = \"Elizabeth Ferguson\"" }, { "id": 20426, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Michelle Briggs\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') )" }, { "id": 20427, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Matthew Benjamin\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 20428, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Retailing stationary sofas/sofa-sleepers\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 20429, "SQL": "select transaction_id from master_txn_table where customers = \"Kathy Ortiz\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 20430, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lauren Brooks\" ) " }, { "id": 20431, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Timothy Crawford\" and transaction_type = 'invoice'" }, { "id": 20432, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 20433, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') group by product_service order by sum(credit) desc limit 1" }, { "id": 20434, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Lori Harrison\"" }, { "id": 20435, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Becky Jones\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 20436, "SQL": "select transaction_date from master_txn_table where customers = \"Keith Peck\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 20437, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 20438, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Lauren Ward\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) )" }, { "id": 20439, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 20440, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Quality assessment\" " }, { "id": 20441, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"John Hughes\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 20442, "SQL": "select avg(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 = \"Kevin Knox MD\" and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 20443, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 20444, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Karen Ward\" order by transaction_date limit 1" }, { "id": 20445, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Attire and accessories\" " }, { "id": 20446, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Alexander Clark\"" }, { "id": 20447, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 20448, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Workers Compensation\") and vendor = \"Tonya Hicks\"" }, { "id": 20449, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Counseling\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 20450, "SQL": "select sum(credit) from master_txn_table where product_service = \"Meal\" and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 20451, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Emma Bautista\" ) " }, { "id": 20452, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Michael Riddle\" order by transaction_date limit 1" }, { "id": 20453, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Denise Lewis\" ) " }, { "id": 20454, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Megan Richards\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 20455, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') and account_type in ('Expense','Other Expense') " }, { "id": 20456, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 20457, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Monique Hamilton\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 20458, "SQL": "select transaction_date 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 = \"Musical\" order by transaction_date asc limit 1 " }, { "id": 20459, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Kerri Wood\"" }, { "id": 20460, "SQL": "select transaction_id from master_txn_table where customers = \"Dana Saunders\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 20461, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Ethan Vasquez\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 20462, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 20463, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Desiree Lopez\" ) " }, { "id": 20464, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 20465, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Jesus Schwartz\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) ) " }, { "id": 20466, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 20467, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Donna Tran\" ) " }, { "id": 20468, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Jillian David\"" }, { "id": 20469, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Juan Flores\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) ) " }, { "id": 20470, "SQL": "select sum(credit) from master_txn_table where product_service = \"Recreational programs\" and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 20471, "SQL": "select max(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 = \"Rodney Kelley\" and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 20472, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"James Moody\" ) " }, { "id": 20473, "SQL": "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\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 20474, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 20475, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Timothy Brewer\" ) " }, { "id": 20476, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jessica Joyce\"" }, { "id": 20477, "SQL": "select transaction_date 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 = \"homebuilders\" order by transaction_date asc limit 1 " }, { "id": 20478, "SQL": "select transaction_date 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 = \"Non-musical\" order by transaction_date asc limit 1 " }, { "id": 20479, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Annette Collins\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 20480, "SQL": "select product_service, 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 transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') group by product_service order by sum(credit) desc limit 1" }, { "id": 20481, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 20482, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Baby carriers\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 20483, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 20484, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 20485, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kaitlyn Mata\" ) " }, { "id": 20486, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Deborah Boyd\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 20487, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Alexa Allen\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) )" }, { "id": 20488, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') order by sum(debit) desc limit 1" }, { "id": 20489, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Wind Power generation\") and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 20490, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 20491, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 20492, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Melissa Love MD\" ) " }, { "id": 20493, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Raymond Campbell\"" }, { "id": 20494, "SQL": "select avg(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 = \"Michael Romero\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 20495, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 20496, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Charles Schmitt\" ) " }, { "id": 20497, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 20498, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by billing_city" }, { "id": 20499, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Zachary Garza\" ) " }, { "id": 20500, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 20501, "SQL": "select transaction_date from master_txn_table where customers = \"Charles Ball\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 20502, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Sarah Fitzgerald\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 20503, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Taylor Rodriguez\"" }, { "id": 20504, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sandra Pratt\" ) " }, { "id": 20505, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 20506, "SQL": "select transaction_date from master_txn_table where customers = \"Luke Hoffman\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 20507, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Heather Pugh\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) )" }, { "id": 20508, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 20509, "SQL": "select transaction_date 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 = \"Games\" order by transaction_date asc limit 1 " }, { "id": 20510, "SQL": "select transaction_date from master_txn_table where customers = \"Jonathan Arnold\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 20511, "SQL": "select sum(credit) from master_txn_table where product_service = \"Healthcare\" and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 20512, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 20513, "SQL": "select transaction_id from master_txn_table where customers = \"Margaret Clark\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 20514, "SQL": "select min(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 = \"Jeremy Wilson\" and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 20515, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Stephanie Caldwell\" ) " }, { "id": 20516, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Jasmin Mitchell\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') ) " }, { "id": 20517, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 20518, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 20519, "SQL": "select transaction_date from master_txn_table where customers = \"Cassie Garcia\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 20520, "SQL": "select transaction_date 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 = \"Appearances and speeches\" order by transaction_date asc limit 1 " }, { "id": 20521, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Theresa Huber\" ) " }, { "id": 20522, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Ashley Mccarthy\" and transaction_type = 'invoice'" }, { "id": 20523, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Patricia English\" ) " }, { "id": 20524, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Susan Garrison\" order by transaction_date limit 1" }, { "id": 20525, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Karen Moss\" ) " }, { "id": 20526, "SQL": "select sum(credit) from master_txn_table where product_service = \"Tablets\" and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 20527, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Dietary and nutritional services\") and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 20528, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Dustin Berry\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 20529, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"David Galloway\" ) " }, { "id": 20530, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Leslie Sweeney\"" }, { "id": 20531, "SQL": "select max(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 = \"Taylor Gutierrez\" and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 20532, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Anne Davis\" ) " }, { "id": 20533, "SQL": "select transaction_id from master_txn_table where customers = \"Nathan Crawford PhD\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 20534, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 20535, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') group by billing_city" }, { "id": 20536, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 20537, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 20538, "SQL": "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,\"Exercise equipment retailing\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 20539, "SQL": "select max(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 = \"Carol Wilson\" and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 20540, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 20541, "SQL": "select transaction_date from master_txn_table where customers = \"Stephanie Harvey\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 20542, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 20543, "SQL": "select sum(credit) from master_txn_table where product_service = \"Child abuse prevention\" and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 20544, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 20545, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 20546, "SQL": "select transaction_id from master_txn_table where customers = \"Justin Carter\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 20547, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Brian White\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) )" }, { "id": 20548, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Yvette Clark\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') )" }, { "id": 20549, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 20550, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Mining machinery and equipment rental or leasing\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 20551, "SQL": "select max(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 = \"Leah Taylor\" and 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') " }, { "id": 20552, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Donald Watts\" ) " }, { "id": 20553, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Aircraft rental or leasing\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 20554, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Wholesaling railroad cars\") and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 20555, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Caleb Wheeler\" ) " }, { "id": 20556, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Shannon Hart\"" }, { "id": 20557, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) group by billing_city" }, { "id": 20558, "SQL": "select avg(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 = \"Rachel Myers\" and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 20559, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 20560, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Wholesaling marine supplies (except pleasure)\") and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 20561, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Boat, ship and steamship rental or leasing\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 20562, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Laura Paul\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) )" }, { "id": 20563, "SQL": "select transaction_id from master_txn_table where customers = \"Sara Allison\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 20564, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Erica Walker\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 20565, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date) AND date(current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 20566, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Daniel Bryant\" ) " }, { "id": 20567, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Megan Ward\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 20568, "SQL": "select transaction_id from master_txn_table where product_service = \"Installation\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 20569, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Martin Thomas\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 20570, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Cost of Labor\") and vendor = \"George Smith\"" }, { "id": 20571, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 20572, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Pamela Smith\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 20573, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 20574, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) group by billing_city" }, { "id": 20575, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Javier Rodriguez\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 20576, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Deborah Jones\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') )" }, { "id": 20577, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Steven Patel' or vendor = 'Steven Patel'" }, { "id": 20578, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Monica Griffith\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 20579, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Derrick Hobbs' or vendor = 'Derrick Hobbs'" }, { "id": 20580, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 20581, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Donald Brown\"" }, { "id": 20582, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 20583, "SQL": "select transaction_date from master_txn_table where customers = \"Vanessa Jones\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 20584, "SQL": "select sum(credit) from master_txn_table where product_service = \"Fishing\" and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 20585, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Joshua Mercado\" ) " }, { "id": 20586, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 20587, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'William Fox' or vendor = 'William Fox'" }, { "id": 20588, "SQL": "select min(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 = \"Meredith Price\" and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 20589, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ariana May\" ) " }, { "id": 20590, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 20591, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Reprographic services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 20592, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Gifts and grants\" " }, { "id": 20593, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Jacob Mahoney\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 20594, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 20595, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 20596, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Victor Williams\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 20597, "SQL": "select max(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 = \"Robert Perry MD\" and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 20598, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Veronica King\" order by transaction_date limit 1" }, { "id": 20599, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 20600, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"David Barrett\" ) " }, { "id": 20601, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"James Palmer\" ) " }, { "id": 20602, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brandon Christensen\" ) " }, { "id": 20603, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date) AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 20604, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lisa Pratt\" ) " }, { "id": 20605, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by billing_city" }, { "id": 20606, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Decks and Patios\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 20607, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Kenneth Martin\"" }, { "id": 20608, "SQL": "select sum(credit) from master_txn_table where product_service = \"Appearances and speeches\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 20609, "SQL": "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,\"Constructing condominiums\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 20610, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Shane Jackson\" ) " }, { "id": 20611, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Casey Mckee\"" }, { "id": 20612, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Catherine Pitts\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 20613, "SQL": "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 railroad switching services\") and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 20614, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by billing_city" }, { "id": 20615, "SQL": "select transaction_id from master_txn_table where customers = \"Justin Faulkner\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 20616, "SQL": "select transaction_id from master_txn_table where customers = \"Ryan Lambert DDS\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 20617, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Robin Bray DDS\"" }, { "id": 20618, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Christian Bridges\" ) " }, { "id": 20619, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Lisa Morris\" and transaction_type = 'payment' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') )" }, { "id": 20620, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Patricia Sanchez\" order by transaction_date limit 1" }, { "id": 20621, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Baby formula and food\") 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') " }, { "id": 20622, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 20623, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 20624, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Vincent Cole\" and transaction_type = 'invoice'" }, { "id": 20625, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 20626, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 20627, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Alexandria Hopkins\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) ) " }, { "id": 20628, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jessica Espinoza\"" }, { "id": 20629, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Greg Hill\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 20630, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Alicia Farmer\" ) " }, { "id": 20631, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Stuart Santana\" ) " }, { "id": 20632, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Rebecca Vaughn\" order by transaction_date limit 1" }, { "id": 20633, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Justin Compton\" ) " }, { "id": 20634, "SQL": "select transaction_id from master_txn_table where customers = \"Michelle Lane\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 20635, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Elizabeth Barnett' or vendor = 'Elizabeth Barnett'" }, { "id": 20636, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Hannah Evans\" ) " }, { "id": 20637, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Penny Carey\" ) " }, { "id": 20638, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Beth Morgan\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 20639, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Sofas/sofa-sleepers\" " }, { "id": 20640, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 20641, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 20642, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and 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') " }, { "id": 20643, "SQL": "select transaction_date from master_txn_table where customers = \"Sean Mann\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 20644, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Cory Cooper\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 20645, "SQL": "select transaction_date from master_txn_table where customers = \"Vincent Jackson\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 20646, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Melanie Bates\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') )" }, { "id": 20647, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Maintenance and Repairs\") and vendor = \"Megan Miller\"" }, { "id": 20648, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Todd Jones' or vendor = 'Todd Jones'" }, { "id": 20649, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Retailing formal dining furniture\") and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 20650, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 20651, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Musical performances\") and 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') " }, { "id": 20652, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Yesenia Perez\" ) " }, { "id": 20653, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jon Day\" ) " }, { "id": 20654, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by billing_city" }, { "id": 20655, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Postal\" " }, { "id": 20656, "SQL": "select avg(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 = \"Bradley Erickson\" and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 20657, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 20658, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 20659, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 20660, "SQL": "select transaction_date 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 = \"Renewable-fueled\" order by transaction_date asc limit 1 " }, { "id": 20661, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 20662, "SQL": "select sum(credit) from master_txn_table where product_service = \"Shunting trailers\" and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 20663, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jordan Banks\" ) " }, { "id": 20664, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Mary Stokes\" ) " }, { "id": 20665, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Rachel Johnson\" ) " }, { "id": 20666, "SQL": "select transaction_date 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 = \"Securities\" order by transaction_date asc limit 1 " }, { "id": 20667, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 20668, "SQL": "select transaction_date from master_txn_table where customers = \"Linda Ford\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 20669, "SQL": "select transaction_id from master_txn_table where product_service = \"Coordinators\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 20670, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') group by billing_city" }, { "id": 20671, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Craig York\" ) " }, { "id": 20672, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Ann Caldwell\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 20673, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Ventilation cleaning\") and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 20674, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Veronica Mcmillan\" ) " }, { "id": 20675, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 20676, "SQL": "select transaction_date from master_txn_table where customers = \"Phillip Turner\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 20677, "SQL": "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,\"Therapeutic services\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 20678, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 20679, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") group by product_service order by sum(credit) desc limit 1" }, { "id": 20680, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jodi Miller\" ) " }, { "id": 20681, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 20682, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) group by billing_city" }, { "id": 20683, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 20684, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 20685, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Donna Martinez\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 20686, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Lisa Moreno\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) ) " }, { "id": 20687, "SQL": "select transaction_date 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 = \"Construction Projects\" order by transaction_date asc limit 1 " }, { "id": 20688, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jillian Taylor\" ) " }, { "id": 20689, "SQL": "select sum(credit) from master_txn_table where product_service = \"Shearing\" and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 20690, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Elaine Vance' or vendor = 'Elaine Vance'" }, { "id": 20691, "SQL": "select transaction_date from master_txn_table where customers = \"Pamela Bell\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 20692, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Tamara Walter\" and transaction_type = 'payment' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') )" }, { "id": 20693, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 20694, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Robert Jordan\"" }, { "id": 20695, "SQL": "select transaction_id from master_txn_table where customers = \"Dylan Jones\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 20696, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Linda Lewis\"" }, { "id": 20697, "SQL": "select transaction_date from master_txn_table where customers = \"Justin Harrison\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 20698, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"William Burke\" order by transaction_date limit 1" }, { "id": 20699, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Manufacturing spearmint oil\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 20700, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Breeding services\") and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 20701, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Patrick Lee\" order by transaction_date limit 1" }, { "id": 20702, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Jeffrey Johnson MD\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") )" }, { "id": 20703, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Manufacturing peppermint oil\") and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 20704, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date) AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 20705, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Brandon Scott MD\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') ) " }, { "id": 20706, "SQL": "select transaction_id from master_txn_table where customers = \"Kara Arnold\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 20707, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Jennifer Kelley MD\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 20708, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Abigail Becker\" ) " }, { "id": 20709, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 20710, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 20711, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Mining machinery and equipment rental or leasing\") and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 20712, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Shannon Murillo\" ) " }, { "id": 20713, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') group by billing_city" }, { "id": 20714, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Chimney sweep services\" " }, { "id": 20715, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Donald Fernandez\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) ) " }, { "id": 20716, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Paul Juarez' or vendor = 'Paul Juarez'" }, { "id": 20717, "SQL": "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,\"Offering equity long-only\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 20718, "SQL": "select transaction_date from master_txn_table where customers = \"Kayla Keller\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 20719, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Repair & Maintenance (deleted)\") and vendor = \"Laura Jarvis\"" }, { "id": 20720, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Katherine Arias\" ) " }, { "id": 20721, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 20722, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Adam Odom\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 20723, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 20724, "SQL": "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\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 20725, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Crystal Leon\" ) " }, { "id": 20726, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jason Lewis\" order by transaction_date limit 1" }, { "id": 20727, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Tammy Fuller\" ) " }, { "id": 20728, "SQL": "select min(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 = \"Beth Porter\" and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 20729, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Baby carriers\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 20730, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 20731, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Emma Contreras\" ) " }, { "id": 20732, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 20733, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') order by sum(debit) desc limit 1" }, { "id": 20734, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 20735, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Omar Singleton\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 20736, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Richard Skinner\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 20737, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 20738, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"George Smith\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 20739, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 20740, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Daniel Camacho\" and transaction_type = 'invoice'" }, { "id": 20741, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Connie Scott\" ) " }, { "id": 20742, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Karen Haley\" ) " }, { "id": 20743, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Offering emerging market funds\") and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 20744, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Nancy Ortiz\" ) " }, { "id": 20745, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 20746, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Emily Smith\" ) " }, { "id": 20747, "SQL": "select avg(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 = \"Amber Peters\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 20748, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Joseph Roberts\" ) " }, { "id": 20749, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Selena Osborne\" ) " }, { "id": 20750, "SQL": "select transaction_id from master_txn_table where product_service = \"Coal Pwer\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 20751, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lori Campbell\" ) " }, { "id": 20752, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Rachel Harris\" and transaction_type = 'payment' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') ) " }, { "id": 20753, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Commissions & fees\") and vendor = \"Carol Luna\"" }, { "id": 20754, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Susan Lozano\" ) " }, { "id": 20755, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Dawn Mercado\" order by transaction_date limit 1" }, { "id": 20756, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Joshua Fisher\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 20757, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 20758, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name 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 account_type in ('Expense','Other Expense') " }, { "id": 20759, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Erika Smith\" ) " }, { "id": 20760, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Pamela Graham\" order by transaction_date limit 1" }, { "id": 20761, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") group by billing_city" }, { "id": 20762, "SQL": "select avg(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 = \"Anthony Campbell\" and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 20763, "SQL": "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 renewable-fueled power generation\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 20764, "SQL": "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,\"Miscellaneous services\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 20765, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Monique Clark MD\" ) " }, { "id": 20766, "SQL": "select max(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 = \"Theresa Thompson\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 20767, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 20768, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Yolanda Johnston\" ) " }, { "id": 20769, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 20770, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Shawn Munoz\" ) " }, { "id": 20771, "SQL": "select transaction_id from master_txn_table where product_service = \"Document Copying\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 20772, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Mark Dean\" ) " }, { "id": 20773, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Lisa Hatfield\" and transaction_type = 'invoice'" }, { "id": 20774, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Rickey Whitaker\" ) " }, { "id": 20775, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Stephen Jennings\"" }, { "id": 20776, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 20777, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Decks and Patios\") and vendor = \"Elizabeth Golden\"" }, { "id": 20778, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Denise Gonzalez\" ) " }, { "id": 20779, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 20780, "SQL": "select sum(credit) from master_txn_table where product_service = \"Boats\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 20781, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jessica Nguyen\" ) " }, { "id": 20782, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Gifts and grants\") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 20783, "SQL": "select transaction_date 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 = \"Medical services\" order by transaction_date asc limit 1 " }, { "id": 20784, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Brian Wright\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') ) " }, { "id": 20785, "SQL": "select transaction_date 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 = \"Multi-strategy\" order by transaction_date asc limit 1 " }, { "id": 20786, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 20787, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jessica Mendez\" and transaction_type = 'invoice'" }, { "id": 20788, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 20789, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Baby furniture\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 20790, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Miss Megan Cook\" ) " }, { "id": 20791, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jocelyn Oconnor\" ) " }, { "id": 20792, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Joshua Frost\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 20793, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 20794, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Andrea Murphy\" ) " }, { "id": 20795, "SQL": "select sum(credit) from master_txn_table where product_service = \"Fishing\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 20796, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Cassandra Carr\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 20797, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 20798, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 20799, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 20800, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Local area network management training\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 20801, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Mallory Mullins\" ) " }, { "id": 20802, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name 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 account_type in ('Expense','Other Expense') " }, { "id": 20803, "SQL": "select transaction_date 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 = \"homebuilders\" order by transaction_date asc limit 1 " }, { "id": 20804, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 20805, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Melanie Watson\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date) AND date(current_date) )" }, { "id": 20806, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by billing_city" }, { "id": 20807, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Angela Pierce\" order by transaction_date limit 1" }, { "id": 20808, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Baby formula and food\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 20809, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Michael Padilla\" and transaction_type = 'invoice'" }, { "id": 20810, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') group by billing_city" }, { "id": 20811, "SQL": "select sum(credit) from master_txn_table where product_service = \"Entertainment\" and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 20812, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ashley Morris\" ) " }, { "id": 20813, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 20814, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 20815, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 20816, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Insurance\") and vendor = \"Jennifer Harvey\"" }, { "id": 20817, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'William Davidson' or vendor = 'William Davidson'" }, { "id": 20818, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Randy Herrera\" order by transaction_date limit 1" }, { "id": 20819, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 20820, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 20821, "SQL": "select transaction_id from master_txn_table where product_service = \"Livestock\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 20822, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Stacey Walton\"" }, { "id": 20823, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Timothy Miles\" ) " }, { "id": 20824, "SQL": "select transaction_date from master_txn_table where customers = \"Morgan James\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 20825, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Design income\") and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 20826, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Development of software products for automobiles\") and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 20827, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Constructing multiunit special-needs complexes\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 20828, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Hector Obrien\" order by transaction_date limit 1" }, { "id": 20829, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Shaun Jones\" order by transaction_date limit 1" }, { "id": 20830, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Brian Wood\"" }, { "id": 20831, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Carrie Williamson\" and transaction_type = 'invoice'" }, { "id": 20832, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Andrew Edwards\"" }, { "id": 20833, "SQL": "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,\"Contract mining\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 20834, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 20835, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Douglas Hendricks\" ) " }, { "id": 20836, "SQL": "select transaction_date 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 = \"License fees\" order by transaction_date asc limit 1 " }, { "id": 20837, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Mary Stephenson\" and transaction_type = 'invoice'" }, { "id": 20838, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Joseph Ponce\" order by transaction_date limit 1" }, { "id": 20839, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 20840, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Mitchell Berger\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) ) " }, { "id": 20841, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date) AND date(current_date) group by billing_city" }, { "id": 20842, "SQL": "select avg(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 = \"Jennifer Lambert\" and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 20843, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Registration for tournaments and matches\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 20844, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Nicole Sweeney\" ) " }, { "id": 20845, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 20846, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)group by product_service order by sum(credit) desc limit 1" }, { "id": 20847, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Kristin Black\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 20848, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 20849, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Michelle Garrett\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 20850, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 20851, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Heather Smith\" ) " }, { "id": 20852, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 20853, "SQL": "select transaction_id from master_txn_table where product_service = \"Financial Investment\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 20854, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Joy Carr\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 20855, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"James Evans\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 20856, "SQL": "select transaction_id from master_txn_table where customers = \"Justin Ho\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 20857, "SQL": "select transaction_date from master_txn_table where customers = \"Michael Gutierrez\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 20858, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Joel Montoya\" ) " }, { "id": 20859, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 20860, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Anna Green\" ) " }, { "id": 20861, "SQL": "select sum(credit) from master_txn_table where product_service = \"Social\" and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 20862, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where 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') and account_type in ('Expense','Other Expense') " }, { "id": 20863, "SQL": "select transaction_date 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 = \"Printing\" order by transaction_date asc limit 1 " }, { "id": 20864, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 20865, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 20866, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') group by billing_city" }, { "id": 20867, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 20868, "SQL": "select transaction_date from master_txn_table where customers = \"Jacqueline Herrera\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 20869, "SQL": "select max(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 = \"Shannon Gonzalez\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 20870, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 20871, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Patrick Johnson\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) )" }, { "id": 20872, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Connor Perez\"" }, { "id": 20873, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Michelle Hines\" order by transaction_date limit 1" }, { "id": 20874, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Regina Young\"" }, { "id": 20875, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 20876, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 20877, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Rachel Ortega' or vendor = 'Rachel Ortega'" }, { "id": 20878, "SQL": "select transaction_id from master_txn_table where product_service = \"License fees\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 20879, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 20880, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lawrence Johnson MD\" ) " }, { "id": 20881, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Darryl Castillo\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 20882, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 20883, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Christopher Henry\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 20884, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Railcar rental or leasing\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 20885, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Carrie Frederick\" order by transaction_date limit 1" }, { "id": 20886, "SQL": "select transaction_id from master_txn_table where product_service = \"Youth\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 20887, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 20888, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 20889, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Alan Cardenas\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 20890, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Scott Davis DDS\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") )" }, { "id": 20891, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Wholesaling aircraft engines and parts\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 20892, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Miguel Smith\" ) " }, { "id": 20893, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 20894, "SQL": "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,\"Bookkeeper\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 20895, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Casey Mcintyre\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 20896, "SQL": "select transaction_date from master_txn_table where customers = \"Daniel Long\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 20897, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Patrick Leonard\" ) " }, { "id": 20898, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Robert Patton\" ) " }, { "id": 20899, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jennifer Becker\" ) " }, { "id": 20900, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Ruben Hughes\"" }, { "id": 20901, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Baby formula and food\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 20902, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Tracy Walter\" order by transaction_date limit 1" }, { "id": 20903, "SQL": "select transaction_date from master_txn_table where customers = \"Samantha Huffman\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 20904, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Wholesaling aircraft engines and parts\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 20905, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Julian Hall\" order by transaction_date limit 1" }, { "id": 20906, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Web hosting\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 20907, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) group by billing_city" }, { "id": 20908, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jacob Hartman\"" }, { "id": 20909, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jennifer Weaver\" ) " }, { "id": 20910, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Receivable (A/R)\") and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 20911, "SQL": "select transaction_date 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 = \"Food & drink\" order by transaction_date asc limit 1 " }, { "id": 20912, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Home Therapy\" " }, { "id": 20913, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 20914, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Adrienne Luna\" ) " }, { "id": 20915, "SQL": "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,\"Attire and accessories\") and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 20916, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Sara Williams\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') ) " }, { "id": 20917, "SQL": "select min(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 = \"Jodi Hernandez\" and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 20918, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Wholesaling navigational instruments (except electronic)\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 20919, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 20920, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lisa Gardner\" ) " }, { "id": 20921, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jeanne Brown\" ) " }, { "id": 20922, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Whitney Ruiz\" ) " }, { "id": 20923, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jessica Robinson\" ) " }, { "id": 20924, "SQL": "select transaction_date from master_txn_table where customers = \"Kenneth Young\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 20925, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Nitrogen manufacturing\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 20926, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") group by billing_city" }, { "id": 20927, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Katie Burnett\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') ) " }, { "id": 20928, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 20929, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Crystal Cantrell\" order by transaction_date limit 1" }, { "id": 20930, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 20931, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name 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 account_type in ('Expense','Other Expense') " }, { "id": 20932, "SQL": "select transaction_date 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 = \"Mailbox Rental\" order by transaction_date asc limit 1 " }, { "id": 20933, "SQL": "select transaction_id from master_txn_table where customers = \"Joyce Lewis\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 20934, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Marie Mendoza\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 20935, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Shannon Scott' or vendor = 'Shannon Scott'" }, { "id": 20936, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 20937, "SQL": "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 = \"Janice Ortiz\" and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 20938, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Stacey Williams\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 20939, "SQL": "select min(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 = \"Julie Bradford\" and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 20940, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 20941, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jennifer Bailey\" ) " }, { "id": 20942, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Keith Rodriguez PhD\" ) " }, { "id": 20943, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Retailing entertainment furniture\") and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 20944, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lauren Cline\" ) " }, { "id": 20945, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 20946, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Cleaning\" " }, { "id": 20947, "SQL": "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,\"Development of software products for mobile devices\") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 20948, "SQL": "select transaction_id from master_txn_table where customers = \"Donald Sherman\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 20949, "SQL": "select sum(credit) from master_txn_table where product_service = \"Oil field Machinery\" and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 20950, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Cost of Labor\") and 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') " }, { "id": 20951, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Constructing bangalow\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 20952, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Karen Sloan\" ) " }, { "id": 20953, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jason Doyle\" ) " }, { "id": 20954, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Peter Powell\" ) " }, { "id": 20955, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Michelle Lee\"" }, { "id": 20956, "SQL": "select transaction_date from master_txn_table where customers = \"Devon Caldwell\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 20957, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Amanda Hall' or vendor = 'Amanda Hall'" }, { "id": 20958, "SQL": "select transaction_date from master_txn_table where customers = \"Amanda Byrd\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 20959, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Emma Ramirez\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 20960, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Christina Luna\" order by transaction_date limit 1" }, { "id": 20961, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 20962, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Furniture\" " }, { "id": 20963, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Angela Graham\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") ) " }, { "id": 20964, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Computer Repairs\") and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 20965, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Beth Bowman\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 20966, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Development of software products for automobiles\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 20967, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Melissa Oliver\" ) " }, { "id": 20968, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Manufacturing peppermint oil\") and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 20969, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') 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') order by sum(debit) desc limit 1" }, { "id": 20970, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 20971, "SQL": "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 = \"Daniel Cox\" and 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') " }, { "id": 20972, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Robert Lynn\" ) " }, { "id": 20973, "SQL": "select avg(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 = \"Kathleen Gibson\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 20974, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"General contracting\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 20975, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 20976, "SQL": "select transaction_date from master_txn_table where customers = \"Samuel Young\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 20977, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"William Rice\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 20978, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and 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') group by billing_city" }, { "id": 20979, "SQL": "select transaction_id from master_txn_table where product_service = \"Snow removal services\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 20980, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Kim Smith\"" }, { "id": 20981, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') group by product_service order by sum(credit) desc limit 1" }, { "id": 20982, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) order by sum(debit) desc limit 1" }, { "id": 20983, "SQL": "select transaction_date 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 = \"Coordinators\" order by transaction_date asc limit 1 " }, { "id": 20984, "SQL": "select transaction_id from master_txn_table where product_service = \"Money Management\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 20985, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Molly Morton\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') ) " }, { "id": 20986, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jared Stokes\" ) " }, { "id": 20987, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 20988, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Lindsey Miller\" and account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 20989, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ryan Mccarty\" ) " }, { "id": 20990, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Jason Garza\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) ) " }, { "id": 20991, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Stephanie Sloan\" order by transaction_date limit 1" }, { "id": 20992, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kathleen Ball\" ) " }, { "id": 20993, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Steven Johnson\" ) " }, { "id": 20994, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Michael Page\" ) " }, { "id": 20995, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Drilling oil and gas wells\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 20996, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Charles Turner\" ) " }, { "id": 20997, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"William Bullock\" order by transaction_date limit 1" }, { "id": 20998, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Aircraft Engines\" " }, { "id": 20999, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Construction management of multifamily building\") and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 21000, "SQL": "select transaction_date from master_txn_table where customers = \"Stephanie Ball\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 21001, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Promotional\") and vendor = \"Lauren Cook\"" }, { "id": 21002, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jacob Woods\" ) " }, { "id": 21003, "SQL": "select transaction_date 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 = \"Coordinators\" order by transaction_date asc limit 1 " }, { "id": 21004, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jesse Larsen\"" }, { "id": 21005, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 21006, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Cindy Davis\"" }, { "id": 21007, "SQL": "select min(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 = \"Jackie Frost\" and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 21008, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Brent Graves' or vendor = 'Brent Graves'" }, { "id": 21009, "SQL": "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,\"Repairing locomotives and railcars (except factory conversion, overhaul and rebuilding)\") and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 21010, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sarah Fuller\" ) " }, { "id": 21011, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jacqueline Nolan\" order by transaction_date limit 1" }, { "id": 21012, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 21013, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 21014, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Ryan Scott\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 21015, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 21016, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 21017, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Recognition software for government and legal purposes\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 21018, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Gas and Electric\") and vendor = \"Jason Stewart\"" }, { "id": 21019, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 21020, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Matthew Crawford\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 21021, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 21022, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 21023, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') group by billing_city" }, { "id": 21024, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Amy Robinson\" and account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 21025, "SQL": "select transaction_date from master_txn_table where customers = \"Sean Suarez\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 21026, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Christian Fernandez\"" }, { "id": 21027, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Bank Charges\") and vendor = \"Jonathan Lee\"" }, { "id": 21028, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 21029, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Emily Wilson PhD\" ) " }, { "id": 21030, "SQL": "select transaction_id from master_txn_table where customers = \"Colleen Murphy\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 21031, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ryan Mercado\" ) " }, { "id": 21032, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 21033, "SQL": "select transaction_date from master_txn_table where customers = \"Larry Grant\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 21034, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Joe Clayton\"" }, { "id": 21035, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 21036, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 21037, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Brian Gilbert\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 21038, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Mark Pena\" ) " }, { "id": 21039, "SQL": "select transaction_date from master_txn_table where customers = \"Brian Thompson\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 21040, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Bobby Dennis\" ) " }, { "id": 21041, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Phillip Howell\" and transaction_type = 'invoice'" }, { "id": 21042, "SQL": "select transaction_date 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 = \"Exercise\" order by transaction_date asc limit 1 " }, { "id": 21043, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Diana Wilson\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 21044, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Jacob Mahoney\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 21045, "SQL": "select transaction_date 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 = \"Installation\" order by transaction_date asc limit 1 " }, { "id": 21046, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Brenda Ferguson\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) )" }, { "id": 21047, "SQL": "select transaction_date 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 = \"Dining\" order by transaction_date asc limit 1 " }, { "id": 21048, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lauren Anderson\" ) " }, { "id": 21049, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Marcia Carroll\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') )" }, { "id": 21050, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Heather Barnes\" order by transaction_date limit 1" }, { "id": 21051, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') group by billing_city" }, { "id": 21052, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 21053, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Andrew Vasquez\" ) " }, { "id": 21054, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Hotels and motel services\") and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 21055, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Nancy Richardson\" ) " }, { "id": 21056, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Bicycle retailing\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 21057, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Wholesaling navigational instruments (except electronic)\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 21058, "SQL": "select transaction_id from master_txn_table where customers = \"Amber Sandoval\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 21059, "SQL": "select transaction_id from master_txn_table where product_service = \"Lemon oil\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 21060, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Social Service\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 21061, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jack Galloway\" ) " }, { "id": 21062, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 21063, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 21064, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Denise Reynolds\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) )" }, { "id": 21065, "SQL": "select transaction_date 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 = \"Drinking and Special Food\" order by transaction_date asc limit 1 " }, { "id": 21066, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"John Cooper\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 21067, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 21068, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Kristen Flores\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 21069, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Timothy Foster\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') )" }, { "id": 21070, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Data storage and management services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 21071, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 21072, "SQL": "select sum(credit) from master_txn_table where product_service = \"environmental projects\" and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 21073, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Shawna Carr\" ) " }, { "id": 21074, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Rodney Bishop\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 21075, "SQL": "select transaction_date from master_txn_table where customers = \"Kelly Rivera\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 21076, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Kathleen Sims\" order by transaction_date limit 1" }, { "id": 21077, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Deborah Rich\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 21078, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Pamela Lozano\" ) " }, { "id": 21079, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Michael Matthews' or vendor = 'Michael Matthews'" }, { "id": 21080, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 21081, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Equipment Rental\") and vendor = \"William Waters\"" }, { "id": 21082, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Sean Rocha' or vendor = 'Sean Rocha'" }, { "id": 21083, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Anthony Lawson\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 21084, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Financial Planning\" " }, { "id": 21085, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') and account_type in ('Expense','Other Expense') " }, { "id": 21086, "SQL": "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,\"Project planning and economic assessments\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 21087, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sarah Hammond\" ) " }, { "id": 21088, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Senior-care\" " }, { "id": 21089, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Charles Beard\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 21090, "SQL": "select min(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 = \"Peter Orozco\" and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 21091, "SQL": "select max(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 = \"Denise Mcdonald\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 21092, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Debbie Moore\" ) " }, { "id": 21093, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Providing shunting trailers in rail terminals\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 21094, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Bank Charges\") and vendor = \"James Rowe\"" }, { "id": 21095, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Henry Moore\" ) " }, { "id": 21096, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"William Mcfarland\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 21097, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 21098, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 21099, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 21100, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Daryl Cooke\" ) " }, { "id": 21101, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Steve Hood\" ) " }, { "id": 21102, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Thomas Maldonado IV\"" }, { "id": 21103, "SQL": "select max(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 = \"Andrew Mcdaniel\" and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 21104, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 21105, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Christian Riley\" ) " }, { "id": 21106, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Derrick Hayes\" ) " }, { "id": 21107, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Phyllis Kramer\" ) " }, { "id": 21108, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Vanessa Schultz\" ) " }, { "id": 21109, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Development of software products for Macs\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 21110, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Maria Hernandez\" ) " }, { "id": 21111, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Kelly Lee\"" }, { "id": 21112, "SQL": "select min(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 = \"Brooke Love\" and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 21113, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Lori Lang\" order by transaction_date limit 1" }, { "id": 21114, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Maria Avery\" order by transaction_date limit 1" }, { "id": 21115, "SQL": "select transaction_id from master_txn_table where product_service = \"Dairy\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 21116, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Wholesaling ships\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 21117, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Joshua Cox' or vendor = 'Joshua Cox'" }, { "id": 21118, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Joseph Lane\" ) " }, { "id": 21119, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Snow removal services\" " }, { "id": 21120, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Meals and Entertainment\") and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 21121, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Office Expenses\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 21122, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Timothy Green\"" }, { "id": 21123, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 21124, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Kayla Christensen\" order by transaction_date limit 1" }, { "id": 21125, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Veronica Erickson\" ) " }, { "id": 21126, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Ariel Jones\" order by transaction_date limit 1" }, { "id": 21127, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) group by billing_city" }, { "id": 21128, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') group by billing_city" }, { "id": 21129, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') order by sum(debit) desc limit 1" }, { "id": 21130, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Donna Alvarado\"" }, { "id": 21131, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Madison Gonzalez\"" }, { "id": 21132, "SQL": "select min(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 = \"Lori Stevenson\" and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 21133, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jasmine Martinez\" ) " }, { "id": 21134, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Cementing walls\" " }, { "id": 21135, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') group by billing_city" }, { "id": 21136, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Rachel Conley\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') )" }, { "id": 21137, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Rent or Lease\") and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 21138, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Carmen Rodriguez\" ) " }, { "id": 21139, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kayla Stokes\" ) " }, { "id": 21140, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') group by billing_city" }, { "id": 21141, "SQL": "select sum(credit) from master_txn_table where product_service = \"Printing\" and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 21142, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Non-renewable\" " }, { "id": 21143, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Development of software products for Tablets\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 21144, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Sierra Cooper\" and transaction_type = 'payment' and 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') ) " }, { "id": 21145, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Roy Russo\" ) " }, { "id": 21146, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') group by product_service order by sum(credit) desc limit 1" }, { "id": 21147, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Photocopying services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 21148, "SQL": "select transaction_id from master_txn_table where product_service = \"Locomotives\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 21149, "SQL": "select max(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 = \"Todd Smith\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 21150, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 21151, "SQL": "select transaction_id from master_txn_table where product_service = \"Steno class\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 21152, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Christopher English\" ) " }, { "id": 21153, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 21154, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Anne Hunter\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 21155, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Ethan Vasquez\"" }, { "id": 21156, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jessica Mendez\" ) " }, { "id": 21157, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 21158, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 21159, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Ashley Gaines\" ) " }, { "id": 21160, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Alexis Lopez\" ) " }, { "id": 21161, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jonathan Rodriguez\" ) " }, { "id": 21162, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Foster care placement services\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 21163, "SQL": "select max(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 = \"Terry Bradford\" and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 21164, "SQL": "select transaction_date from master_txn_table where customers = \"Mariah Riley\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 21165, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Raymond Bowers\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 21166, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Nathaniel Hernandez\" order by transaction_date limit 1" }, { "id": 21167, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Kristin Herman\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) ) " }, { "id": 21168, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Stephanie Russell\" ) " }, { "id": 21169, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Rebecca Rios\" ) " }, { "id": 21170, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Telephone\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 21171, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 21172, "SQL": "select transaction_date from master_txn_table where customers = \"Kevin Abbott\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 21173, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Laura Ramos' or vendor = 'Laura Ramos'" }, { "id": 21174, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Stephen Pope\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) ) " }, { "id": 21175, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Amanda Goodman\" order by transaction_date limit 1" }, { "id": 21176, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 21177, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Barbara Davis\" order by transaction_date limit 1" }, { "id": 21178, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Brandon Soto\"" }, { "id": 21179, "SQL": "select min(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 = \"Anthony Stevens\" and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 21180, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 21181, "SQL": "select sum(credit) from master_txn_table where product_service = \"Services\" and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 21182, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 21183, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Adam Ramirez\" ) " }, { "id": 21184, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Stephanie Taylor\" and transaction_type = 'payment' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) )" }, { "id": 21185, "SQL": "select transaction_date from master_txn_table where customers = \"Deanna Butler MD\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 21186, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"David King\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 21187, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'April Stewart' or vendor = 'April Stewart'" }, { "id": 21188, "SQL": "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,\"Billable Expense Income\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') " }, { "id": 21189, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and 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') " }, { "id": 21190, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Leonard Wright\" and transaction_type = 'invoice'" }, { "id": 21191, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 21192, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kristen Charles\" ) " }, { "id": 21193, "SQL": "select max(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 = \"Leslie Ramirez\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 21194, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Cindy Hill\"" }, { "id": 21195, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 21196, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Mark Murphy\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 21197, "SQL": "select transaction_id from master_txn_table where product_service = \"Social\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 21198, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') order by sum(debit) desc limit 1" }, { "id": 21199, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Zachary Gonzalez\"" }, { "id": 21200, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Travis Bray\" order by transaction_date limit 1" }, { "id": 21201, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 21202, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 21203, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Jason Scott\"" }, { "id": 21204, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Emily Sanchez\" and transaction_type = 'payment' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') )" }, { "id": 21205, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Lance Ramirez\"" }, { "id": 21206, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Laura Gamble DVM\" ) " }, { "id": 21207, "SQL": "select transaction_id from master_txn_table where customers = \"Marvin Hayes\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 21208, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Dakota Osborne\"" }, { "id": 21209, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Abigail Perry\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 21210, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Repair & Maintenance (deleted)\") and vendor = \"David Murphy\"" }, { "id": 21211, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 21212, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brandi Good\" ) " }, { "id": 21213, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Raymond Long\" and transaction_type = 'invoice'" }, { "id": 21214, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Justin Salazar\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 21215, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 21216, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 21217, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 21218, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 21219, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lauren Lee\" ) " }, { "id": 21220, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 21221, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Livestock\" " }, { "id": 21222, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Amber Mcguire\" ) " }, { "id": 21223, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 21224, "SQL": "select transaction_date from master_txn_table where customers = \"Michael Arnold\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 21225, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 21226, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Connor Roth\" ) " }, { "id": 21227, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Karen Parker\" ) " }, { "id": 21228, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Installation\" " }, { "id": 21229, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Rebecca Mckinney DDS\" ) " }, { "id": 21230, "SQL": "select transaction_date 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 = \"Lemon oil\" order by transaction_date asc limit 1 " }, { "id": 21231, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Adoption placement services\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 21232, "SQL": "select transaction_date from master_txn_table where customers = \"Kimberly Mills\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 21233, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Nancy Juarez\"" }, { "id": 21234, "SQL": "select sum(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Trust and Fiduciary\" " }, { "id": 21235, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Steven Harris\" ) " }, { "id": 21236, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Joel Howard' or vendor = 'Joel Howard'" }, { "id": 21237, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) group by billing_city" }, { "id": 21238, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 21239, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 21240, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Patricia Velasquez\"" }, { "id": 21241, "SQL": "select transaction_date from master_txn_table where customers = \"Heidi Parker\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 21242, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Ross Coleman\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 21243, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Stephanie Estes\" ) " }, { "id": 21244, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Amber Reeves\" order by transaction_date limit 1" }, { "id": 21245, "SQL": "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,\"Workers Compensation\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 21246, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 21247, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 21248, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Helen Hayes\"" }, { "id": 21249, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Registration for tournaments and matches\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 21250, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 21251, "SQL": "select sum(credit) from master_txn_table where product_service = \"Computer Programming\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 21252, "SQL": "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 courses through business schools\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 21253, "SQL": "select avg(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 = \"Tony Marquez\" and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 21254, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 21255, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Physical therapy\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 21256, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Manufacturing other Synthetic Oils\") 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') " }, { "id": 21257, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Surveying wells\") and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 21258, "SQL": "select transaction_id from master_txn_table where customers = \"Barry White\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 21259, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Dennis Hunter\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 21260, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Elizabeth Huerta\" order by transaction_date limit 1" }, { "id": 21261, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Fuel\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 21262, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Data entry services\") and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 21263, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Kaitlyn Stanley\"" }, { "id": 21264, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Anna Stewart\" ) " }, { "id": 21265, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Teresa Cooper\" ) " }, { "id": 21266, "SQL": "select transaction_date from master_txn_table where customers = \"Angel Carter\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 21267, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Lisa Moody\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 21268, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 21269, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Natalie Riley\" ) " }, { "id": 21270, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Raymond Conrad\" ) " }, { "id": 21271, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Katie Herman\" and transaction_type = 'invoice'" }, { "id": 21272, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 21273, "SQL": "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\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 21274, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Popular music shows\" " }, { "id": 21275, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Geothermal-fueled power generation\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 21276, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 21277, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Madeline Dalton\" ) " }, { "id": 21278, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Caleb Smith\"" }, { "id": 21279, "SQL": "select transaction_id from master_txn_table where product_service = \"Installation\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 21280, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Amusement and recreation services\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 21281, "SQL": "select transaction_date from master_txn_table where customers = \"Lori Anderson\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 21282, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 21283, "SQL": "select transaction_id from master_txn_table where product_service = \"Business management\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 21284, "SQL": "select transaction_id from master_txn_table where product_service = \"Teen outreach\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 21285, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Service Provider\" " }, { "id": 21286, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Christopher Stewart\" ) " }, { "id": 21287, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Lisa Kelly\" ) " }, { "id": 21288, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Leroy Rodriguez\" order by transaction_date limit 1" }, { "id": 21289, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 21290, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 21291, "SQL": "select transaction_id from master_txn_table where product_service = \"Symphony\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 21292, "SQL": "select min(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Installation\" " }, { "id": 21293, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 21294, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Cynthia Olsen\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 21295, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Lori Berry\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 21296, "SQL": "select sum(credit) from master_txn_table where product_service = \"Home Therapy\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 21297, "SQL": "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,\"Musical performances\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+11 month') AND date(current_date, '-1 year', 'start of year', '+12 month', '-1 day') " }, { "id": 21298, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 21299, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 21300, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 21301, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Vincent Lewis\" ) " }, { "id": 21302, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jeffrey Lynch\" order by transaction_date limit 1" }, { "id": 21303, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 21304, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 21305, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Anthony Hicks\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 21306, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Joann Aguilar\" order by transaction_date limit 1" }, { "id": 21307, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 21308, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Allen Fisher\"" }, { "id": 21309, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Paula Norris\" order by transaction_date limit 1" }, { "id": 21310, "SQL": "select transaction_id from master_txn_table where customers = \"Janice Porter\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 21311, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Meal services\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 21312, "SQL": "select transaction_date from master_txn_table where customers = \"Jamie Wood\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 21313, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Eric Ramirez\" ) " }, { "id": 21314, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 21315, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') group by billing_city" }, { "id": 21316, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Accounts Payable (A/P)\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 21317, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 21318, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Emily Little\" ) " }, { "id": 21319, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Tricia Patel' or vendor = 'Tricia Patel'" }, { "id": 21320, "SQL": "select transaction_id from master_txn_table where customers = \"Kelli Charles\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 21321, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 21322, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Equipment Repairs\") and vendor = \"Whitney Gardner\"" }, { "id": 21323, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Carlos Soto\" order by transaction_date limit 1" }, { "id": 21324, "SQL": "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,\"Document copying services\") and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 21325, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Kenneth Norton\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') ) " }, { "id": 21326, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Brittany Bowers\" and transaction_type = 'invoice'" }, { "id": 21327, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Christopher Wiggins\" order by transaction_date limit 1" }, { "id": 21328, "SQL": "select transaction_date 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 = \"Swimming pool Cleaning\" order by transaction_date asc limit 1 " }, { "id": 21329, "SQL": "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,\"Offering distressed securities funds\") and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') " }, { "id": 21330, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Paul Hunter\" ) " }, { "id": 21331, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Thomas Henry\" ) " }, { "id": 21332, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Suzanne King\"" }, { "id": 21333, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Jeremy Bird\"" }, { "id": 21334, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 21335, "SQL": "select transaction_id from master_txn_table where product_service = \"Photocopying\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 21336, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Job Expenses\") and vendor = \"Charles Beard\"" }, { "id": 21337, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Photography\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 21338, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Michael Manning\" ) " }, { "id": 21339, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 21340, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Disposal Fees\") and vendor = \"Angela Gibbs\"" }, { "id": 21341, "SQL": "select transaction_date 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 = \"Housing\" order by transaction_date asc limit 1 " }, { "id": 21342, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 21343, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Advertising\") and vendor = \"Ashley Anderson\"" }, { "id": 21344, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 21345, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 21346, "SQL": "select transaction_date from master_txn_table where customers = \"Audrey Anderson\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 21347, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"John Castillo\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 21348, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') group by billing_city" }, { "id": 21349, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Nicholas King\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 21350, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Rental Services\") and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 21351, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') and account_type in ('Expense','Other Expense') " }, { "id": 21352, "SQL": "select min(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 = \"Brian Jacobs\" and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 21353, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Heather Watson\" ) " }, { "id": 21354, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") order by sum(debit) desc limit 1" }, { "id": 21355, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 21356, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Rebecca Velez\" and account_type in ('Expense','Other Expense') 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') " }, { "id": 21357, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') and account_type in ('Expense','Other Expense') " }, { "id": 21358, "SQL": "select transaction_date from master_txn_table where customers = \"Meredith Cuevas\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 21359, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Tracey Douglas\" order by transaction_date limit 1" }, { "id": 21360, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Judith Carroll' or vendor = 'Judith Carroll'" }, { "id": 21361, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 21362, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Tami Barnett\" and transaction_type = 'invoice'" }, { "id": 21363, "SQL": "select transaction_date from master_txn_table where customers = \"Jackson Lynch\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 21364, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"James Torres MD\" ) " }, { "id": 21365, "SQL": "select sum(credit) from master_txn_table where product_service = \"Traveller accomodation\" and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 21366, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Equipment Rental\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 21367, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Renee Schultz\" ) " }, { "id": 21368, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Catering services\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 21369, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Christopher Decker\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 21370, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and 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') " }, { "id": 21371, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 21372, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brianna Williams\" ) " }, { "id": 21373, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Reginald Spears\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 21374, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Nathaniel Hicks\" order by transaction_date limit 1" }, { "id": 21375, "SQL": "select transaction_date 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 = \"Personal Care\" order by transaction_date asc limit 1 " }, { "id": 21376, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Wood- and wood waste-fueled power generation\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+3 month', '-1 day') " }, { "id": 21377, "SQL": "select avg(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Recreational programs\" " }, { "id": 21378, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"James Lang\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 21379, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kyle Rodriguez\" ) " }, { "id": 21380, "SQL": "select sum(credit) from master_txn_table where product_service = \"Bars and Nightclubs\" and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') " }, { "id": 21381, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Debra Banks\" order by transaction_date limit 1" }, { "id": 21382, "SQL": "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 engines and parts\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 21383, "SQL": "select transaction_date from master_txn_table where customers = \"John Mccoy\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 21384, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Peter Torres\" ) " }, { "id": 21385, "SQL": "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,\"Loan Payable\") 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') " }, { "id": 21386, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Natasha Watson\" ) " }, { "id": 21387, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) and account_type in ('Expense','Other Expense') " }, { "id": 21388, "SQL": "select product_service, 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 transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) group by product_service order by sum(credit) desc limit 1" }, { "id": 21389, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 21390, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Private parcel mailing centers\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date)" }, { "id": 21391, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Manufacturing citronella oil\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 21392, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Printing\" " }, { "id": 21393, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 21394, "SQL": "select avg(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 = \"Allison Marsh\" and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 21395, "SQL": "select sum(credit) from master_txn_table where product_service = \"Railroad Equipment\" and transaction_date BETWEEN date(current_date) AND date(current_date) " }, { "id": 21396, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Breanna Rodriguez\" ) " }, { "id": 21397, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Traci Cantu\" ) " }, { "id": 21398, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jillian Mason\" ) " }, { "id": 21399, "SQL": "select transaction_id from master_txn_table where customers = \"Karen Gallegos\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 21400, "SQL": "select transaction_id from master_txn_table where customers = \"Alex Hayes\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 21401, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Howard Bennett\" ) " }, { "id": 21402, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Donna Cummings\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 21403, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') order by sum(debit) desc limit 1" }, { "id": 21404, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Deborah Holmes\" order by transaction_date limit 1" }, { "id": 21405, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Debra Burnett\" ) " }, { "id": 21406, "SQL": "select transaction_date from master_txn_table where customers = \"Jon Zamora\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 21407, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 21408, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 21409, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Frederick Miller' or vendor = 'Frederick Miller'" }, { "id": 21410, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Bookkeeper\") and vendor = \"Michael Bird\"" }, { "id": 21411, "SQL": "select transaction_date 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 = \"Macro\" order by transaction_date asc limit 1 " }, { "id": 21412, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Lemon oil\" " }, { "id": 21413, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Ventilation cleaning\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 21414, "SQL": "select transaction_date from master_txn_table where customers = \"Anthony Cole\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 21415, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Shelia Mccann\" ) " }, { "id": 21416, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Peter Martinez\" ) " }, { "id": 21417, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jesse Walker\" ) " }, { "id": 21418, "SQL": "select transaction_date 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 = \"--\" order by transaction_date asc limit 1 " }, { "id": 21419, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') and account_type in ('Expense','Other Expense') " }, { "id": 21420, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 21421, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date) AND date(current_date) order by sum(debit) desc limit 1" }, { "id": 21422, "SQL": "select max(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 = \"Patty Aguilar\" and transaction_date < strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 4), -2, 2) || '-01') " }, { "id": 21423, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Angela Anderson\" order by transaction_date limit 1" }, { "id": 21424, "SQL": "select transaction_id from master_txn_table where customers = \"Amber Sanchez\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 21425, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Christian Hartman\"" }, { "id": 21426, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Development of software products for mobile devices\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 21427, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Kelly Henson\"" }, { "id": 21428, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Equipment Repairs\") and vendor = \"Robin Bray DDS\"" }, { "id": 21429, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) group by billing_city" }, { "id": 21430, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Matthew Knight\" order by transaction_date limit 1" }, { "id": 21431, "SQL": "select max(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 = \"Edward Ruiz\" and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 21432, "SQL": "select transaction_id from master_txn_table where product_service = \"Services\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 21433, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Richard Graham\"" }, { "id": 21434, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 21435, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Stationery & Printing\") and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 21436, "SQL": "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,\"Refunds-Allowances\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 21437, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Wendy Prince\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 21438, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Sheri Dougherty\" ) " }, { "id": 21439, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jessica Cunningham\" ) " }, { "id": 21440, "SQL": "select transaction_id from master_txn_table where customers = \"Gabrielle Walker\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 21441, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by billing_city" }, { "id": 21442, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Shelby Duke\" ) " }, { "id": 21443, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 21444, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) group by billing_city" }, { "id": 21445, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 21446, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Edward Palmer\" ) " }, { "id": 21447, "SQL": "select transaction_id from master_txn_table where customers = \"Lisa Scott\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 21448, "SQL": "select transaction_date from master_txn_table where customers = \"Robin Clark\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 21449, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) group by billing_city" }, { "id": 21450, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 21451, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Courtney Lee\" order by transaction_date limit 1" }, { "id": 21452, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where transaction_date BETWEEN date(current_date) AND date(current_date) and account_type in ('Expense','Other Expense') " }, { "id": 21453, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Vincent Hayden\" and account_type in ('Expense','Other Expense') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 21454, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Donna Gonzalez\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 21455, "SQL": "select max(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Government Purposes\" " }, { "id": 21456, "SQL": "select distinct payment_method from master_txn_table where transaction_type = 'invoice' and transaction_id = \"[invoice_number]\"" }, { "id": 21457, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"James Kelley\" ) " }, { "id": 21458, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Taxes & Licenses\") and vendor = \"Darryl Castillo\"" }, { "id": 21459, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 21460, "SQL": "select transaction_date from master_txn_table where customers = \"Jason Craig\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 21461, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Design and management services \") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 21462, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Gary Steele' or vendor = 'Gary Steele'" }, { "id": 21463, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Monica Weaver\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 21464, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kristina Oneill\" ) " }, { "id": 21465, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Gerald Coleman\"" }, { "id": 21466, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Kelsey Olson\" ) " }, { "id": 21467, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Jeffery Bowen\" order by transaction_date limit 1" }, { "id": 21468, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Louis Gray\" ) " }, { "id": 21469, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 21470, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 21471, "SQL": "select transaction_date from master_txn_table where customers = \"Trevor Henry\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 21472, "SQL": "select product_service, 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 transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') group by product_service order by sum(credit) desc limit 1" }, { "id": 21473, "SQL": "select transaction_date from master_txn_table where customers = \"Darren Oconnor\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 21474, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Andrea Allison\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') " }, { "id": 21475, "SQL": "select transaction_id from master_txn_table where product_service = \"Boat\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 21476, "SQL": "SELECT T2.product_service_type , sum(T1.quantity) FROM master_txn_table AS T1 JOIN Product_Service AS T2 ON T1.product_service = T2.product_service where T1.transaction_type in ('invoice', 'sales receipt') GROUP BY T2.product_service_type" }, { "id": 21477, "SQL": "select avg(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 = \"Donald Phillips\" and transaction_date BETWEEN date(current_date, 'start of year','+3 month') AND date(current_date, 'start of year', '+6 month', '-1 day') " }, { "id": 21478, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') group by billing_city" }, { "id": 21479, "SQL": "select sum(credit) from master_txn_table where transaction_type = 'invoice' and product_service = \"Brokerage\" " }, { "id": 21480, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"James Rice\" ) " }, { "id": 21481, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jeffery Johnson\" ) " }, { "id": 21482, "SQL": "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,\"Quality management accreditation\") and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 21483, "SQL": "select sum(debit)/12 from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where instr(account,\"Development of software products for mobile devices\") and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date,'start of month','-12 month') and date(current_date,'start of month','-1 day')" }, { "id": 21484, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Aaron Martin DVM\" ) " }, { "id": 21485, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jeff Cooper\" ) " }, { "id": 21486, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Susan Dickson\" ) " }, { "id": 21487, "SQL": "select product_service, 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 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') group by product_service order by sum(credit) desc limit 1" }, { "id": 21488, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Carol Williams\"" }, { "id": 21489, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Baby formula and food\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 21490, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Golf equipment and supply retailing\") and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 21491, "SQL": "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,\"Street vending locations\") and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date, 'start of year', '+1 month', '-1 day') " }, { "id": 21492, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 21493, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brian White\" ) " }, { "id": 21494, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Jennifer Simon\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) )" }, { "id": 21495, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Promotional\") and vendor = \"Justin Martinez\"" }, { "id": 21496, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') group by billing_city" }, { "id": 21497, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Derrick Richard\"" }, { "id": 21498, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Amusement and recreation services\") and transaction_date BETWEEN date( current_date, \"weekday 0\", \"-7 days\") AND date( current_date) " }, { "id": 21499, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Aircraft rental or leasing\") and transaction_date BETWEEN date( current_date, \"-12 months\", \"start of month\") AND date( current_date, 'start of month', '-1 day') " }, { "id": 21500, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Brianna Perry\" and transaction_type = 'payment' and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') ) " }, { "id": 21501, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 21502, "SQL": "select avg(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 = \"Gregory Jones\" and transaction_date BETWEEN date( current_date, \"-30 days\") AND date( current_date) " }, { "id": 21503, "SQL": "select min(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 = \"Sonya Schaefer\" and transaction_date BETWEEN date( current_date, \"start of month\", \"-1 months\") AND date( current_date, \"start of month\", \"-1 days\") " }, { "id": 21504, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Jessica Norris\"" }, { "id": 21505, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Trevor Lawrence\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 21506, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date( current_date, \"-7 days\") AND date( current_date) " }, { "id": 21507, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jamie Foster\" ) " }, { "id": 21508, "SQL": "select billing_city, sum(credit) from master_txn_table as T1 inner join customers as T2 on T1.customers = T2.customer_name where account in ('Income','Other Income') and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') group by billing_city" }, { "id": 21509, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 21510, "SQL": "select transaction_id from master_txn_table where customers = \"Ronald Snyder\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 21511, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Denise Andrews\" order by transaction_date limit 1" }, { "id": 21512, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Casey Hill\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 21513, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 21514, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Patricia Martinez\" ) " }, { "id": 21515, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Dillon Beasley\"" }, { "id": 21516, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 21517, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Miguel Martinez\" ) " }, { "id": 21518, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Brooke Valdez\" ) " }, { "id": 21519, "SQL": "select account, sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense','Other Expense') and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') order by sum(debit) desc limit 1" }, { "id": 21520, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Angel Huang\"" }, { "id": 21521, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Bianca Parker\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year', '-1 days', 'start of year') AND date(current_date, 'start of year', '-1 days') ) " }, { "id": 21522, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Manufacturing orange oil\") and transaction_date >= strftime('%Y-%m-%d', strftime('%Y', 'now', '-1 year') || '-' || substr('00' || (((strftime('%m', 'now') - 1) / 3) * 3 + 1), -2, 2) || '-01') " }, { "id": 21523, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Sherry Juarez\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year','-1 years', '+3 months') AND date(current_date, '-3 months', 'start of year','-1 years', '+3 months', '+1 years', '-1 days') )" }, { "id": 21524, "SQL": "select transaction_date from master_txn_table where customers = \"Michael Weaver\" and transaction_type = 'payment' order by transaction_date desc limit 1" }, { "id": 21525, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 21526, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Paul Reid\" ) " }, { "id": 21527, "SQL": "select customers from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 21528, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " }, { "id": 21529, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jonathan Booker DDS\" ) " }, { "id": 21530, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 21531, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Wendy Cruz\" ) " }, { "id": 21532, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Clayton Gray\" ) " }, { "id": 21533, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Stephen Blair\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 21534, "SQL": "select transaction_date 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 = \"Bangalow\" order by transaction_date asc limit 1 " }, { "id": 21535, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Jenna Carroll\" ) " }, { "id": 21536, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Darryl Alvarado\"" }, { "id": 21537, "SQL": "select customers, sum(open_balance) as outstanding from ( select distinct transaction_id, customers, open_balance from master_txn_table ) group by customers order by sum(open_balance) desc limit 1 " }, { "id": 21538, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Joseph Duncan\"" }, { "id": 21539, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Laura Spencer\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+4 month') AND date(current_date, '-1 year', 'start of year', '+5 month', '-1 day') )" }, { "id": 21540, "SQL": "select transaction_id from master_txn_table where product_service = \"Home-care\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 21541, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Kristi Ellis\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 21542, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Douglas Jefferson\" ) " }, { "id": 21543, "SQL": "select transaction_date 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 = \"Clothing and footwear\" order by transaction_date asc limit 1 " }, { "id": 21544, "SQL": "select transaction_id from master_txn_table where customers = \"Andrew Hansen\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 21545, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Raymond Levy\" ) " }, { "id": 21546, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Accounts Payable (A/P)\") and vendor = \"Isaac Mitchell\"" }, { "id": 21547, "SQL": "select sum(debit) from master_txn_table where account = 'accounts receivable (a/r)' and transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) " }, { "id": 21548, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Christopher Cole\" ) " }, { "id": 21549, "SQL": "select distinct transaction_id from master_txn_table where customers = \"Ryan Ramirez\"" }, { "id": 21550, "SQL": "select transaction_id from master_txn_table where product_service = \"Well casings\" and transaction_type = 'invoice' order by transaction_date limit 1" }, { "id": 21551, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"Timothy Davis\" and account_type in ('Expense','Other Expense') and transaction_date BETWEEN date( current_date, \"-1 day\") AND date( current_date, \"-1 day\") " }, { "id": 21552, "SQL": "select transaction_date from master_txn_table where transaction_type = 'payment' and customers = \"Christopher Sandoval\" order by transaction_date limit 1" }, { "id": 21553, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Joan Gibson\" and open_balance > 0 and transaction_type = 'invoice'" }, { "id": 21554, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Coordinators\") and transaction_date BETWEEN date( current_date, \"start of month\") AND date( current_date) " }, { "id": 21555, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = \"Kendra Shaw\"" }, { "id": 21556, "SQL": "select sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Expense', 'Other Expense') and instr(account,\"Legal & Professional Fees\") and vendor = \"Dawn Williams\"" }, { "id": 21557, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Thomas Gamble\" ) " }, { "id": 21558, "SQL": "select sum(credit) from master_txn_table where product_service = \"AI Courses\" and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) " }, { "id": 21559, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Mary Sanders\" ) " }, { "id": 21560, "SQL": "select date(transaction_date, 'start of month'), sum(debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where vendor = \"\"Jeffrey Barton\"\" and account_type in ('Expense','Other Expense') group by date(transaction_date, 'start of month')" }, { "id": 21561, "SQL": "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 locomotives\") and 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') " }, { "id": 21562, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Paul Anderson\" ) " }, { "id": 21563, "SQL": "select sum(amount) from (select distinct transaction_id, amount from master_txn_table where customers = \"Jacob Lee\" and transaction_type = 'payment' and transaction_date BETWEEN date(current_date, 'start of year', '+7 month') AND date(current_date, 'start of year', '+8 month', '-1 day') ) " }, { "id": 21564, "SQL": "select count(distinct transaction_id) from master_txn_table where customers = 'Casey Reed' or vendor = 'Casey Reed'" }, { "id": 21565, "SQL": "select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = \"Melissa Buchanan\" ) " }, { "id": 21566, "SQL": "SELECT distinct transaction_id FROM master_txn_table WHERE transaction_date < \"1989-09-03\" OR transaction_date > \"2007-12-25\" " } ]