Question stringlengths 22 148 | SQLQuery stringlengths 73 474 | SQLResult stringclasses 55
values | Answer stringclasses 56
values | text stringlengths 553 976 |
|---|---|---|---|---|
Income of last 3 months. ? | SELECT SUM(Deposit_amount) AS Total_Income FROM transactions WHERE Value_date >= DATE_SUB(CURRENT_DATE(), INTERVAL 3 MONTH) | 1530205868 | 1530205868 is the income of last 3 months. | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
Total expenses/spendings of last 8 months ? | SELECT SUM(Withdrawal_amount) AS Total_Expenses FROM transactions WHERE Value_date >= DATE_SUB(CURRENT_DATE(), INTERVAL 8 MONTH) | 11274528407 | 11274528407 is the total expenses of last 8 months. | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
what is my total expenses of last 3 months ? | SELECT SUM(Withdrawal_amount) AS Total_Expenses FROM transactions WHERE Value_date >= DATE_SUB(CURRENT_DATE(), INTERVAL 3 MONTH) | 11274528407 | 11274528407 is the total expenses of last 8 months. | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
what is my total expenses of last 4 months for account number 87523? | SELECT SUM(Withdrawal_amount) AS Total_Expenses FROM transactions WHERE Account_No='87523' Value_date >= DATE_SUB(CURRENT_DATE(), INTERVAL 3 MONTH) | 11274528407 | 11274528407 is the total expenses of last 8 months. | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
Total saving of last month as my account number is 409000493201' ? | SELECT (SUM(Deposit_amount) - SUM(Withdrawal_amount)) AS Savings_Last_Month FROM transactions WHERE Account_No = "409000493201'" AND YEAR(Value_date) = YEAR(CURRENT_DATE() - INTERVAL 1 MONTH) AND MONTH(Value_date) = MONTH(CURRENT_DATE() - INTERVAL 1 MONTH);
| -193509 | You lost -193509 last month. | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
How many transactions did I make in last 2 week | SELECT COUNT(*) AS Total_Transactions FROM transactions WHERE Value_date >= DATE_SUB(CURRENT_DATE(), INTERVAL 2 WEEK) | 162 | You made 162 transactions in last 2 week. | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
Amount spent last week | SELECT SUM(Withdrawal_amount) AS Total_Spending FROM transactions WHERE Value_date >= DATE_SUB(CURRENT_DATE(), INTERVAL 1 WEEK) | 0 is your total spending last week. | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... | |
Expenses for each day this month ? | SELECT Date, SUM(Withdrawal_amount) AS Total_Expenses FROM transactions WHERE YEAR(Value_date) = YEAR(CURRENT_DATE()) AND MONTH(Value_date) = MONTH(CURRENT_DATE()) GROUP BY Date |
Date Total_Expenses
2024-06-02 183648
2024-06-03 80666
2024-06-04 135504
2024-06-05 92031
2024-06-06 118475
2024-06-07 16440
2024-06-09 62112
2024-06-10 ... | The total_expenses is 183648,80666,135504,92031,118475,16440,62112,10331 for the year 2024 month of 6 and date 02,03,04,05,06,07,09 and 10. | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
savings of previous year for each month | SELECT MONTH(Value_date) AS Month, (SUM(Deposit_amount) - SUM(Withdrawal_amount)) AS Total_Savings FROM transactions WHERE YEAR(Value_date) = YEAR(CURRENT_DATE() - INTERVAL 1 YEAR) GROUP BY MONTH(Value_date) ORDER BY MONTH(Value_date) |
Date Total_Expenses
1 -311244
2 9101
3 3476
4 -15971
5 322249
6 -172560
7 361471
... | Month-1:-311244, Month-2:9101, Month-3:3476 | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
Amount Saved each year | SELECT YEAR(Value_date) AS Year,SUM(Deposit_amount) - SUM(Withdrawal_amount) AS Savings FROM transactions GROUP BY YEAR(Value_date) |
Year Savings
2021 497766
2022 272458
2023 -340550
2024 -148114
| You saved 497766 in 2021 ,272458 in 2022, -340550 in 2023 and -148114 in 2024. | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
Savings of last 2 year | SELECT YEAR(Value_date) AS Year, SUM(Deposit_amount) - SUM(Withdrawal_amount) AS Net_Savings FROM transactions WHERE Value_date >= DATE_SUB(CURRENT_DATE(), INTERVAL 2 YEAR) GROUP BY YEAR(Value_date) |
Year Savings
2022 2270453
2023 -895783
2024 -912470
| You saved 2270453 in 2022, -89578 in 2023 and -912470 in 2024. | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
Expenses of each day of last week | SELECT DATE(Value_date) AS Date, SUM(Withdrawal_amount) AS Total_Spending FROM transactions WHERE Value_date >= DATE_SUB(CURDATE(), INTERVAL 1 WEEK) GROUP BY DATE(Value_date) |
Year Savings
2024-06-06 118475
2024-06-07 16440
2024-06-09 62112
2024-06-10 10331
| You spend 118475,16440,62112,10331. | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
Amount spent this year ? | SELECT year(Value_date) as Year,sum(Withdrawal_amount) AS Total_Expenses FROM transactions WHERE year(Value_date) = year(curdate()) group by year(Value_date) |
Year Total_Expenses
2024 6527128485
| You spent 36616174 this year. | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
amount/money saved each month previous year ? | SELECT YEAR(Value_date) AS Year, MONTH(Value_date) AS Month, SUM(Deposit_amount) - SUM(Withdrawal_amount) AS Savings FROM transactions WHERE YEAR(Value_date) = YEAR(CURRENT_DATE - INTERVAL 1 YEAR) GROUP BY YEAR(Value_date), MONTH(Value_date) |
Year Month Savings
2023 1 -311244
2023 2 9101
2023 3 3476
2023 4 -15971
2023 5 322249
... | You lost 311244 in month 1 ,saved 9101,3476 in month 2 and month 3 previous year. | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
income of the previous year | SELECT SUM(Deposit_amount) AS Total_Income FROM transactions WHERE YEAR(Value_date) = YEAR(CURRENT_DATE) - 1 | 38593214103 | Your income previous ysear was 38593214103. | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
income of the first 4 month of previous year | SELECT SUM(Deposit_amount) AS Total_Income FROM transactions WHERE MONTH(Value_date) IN (1,2,3,4) AND YEAR(Value_date) = YEAR(CURRENT_DATE) - 1 | 17847505444 | Your income of first 4 month of previous year was 17847505444. | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
amount I lost each year? |
SELECT YEAR(Value_date) AS Year,SUM(Withdrawal_amount) - SUM(Deposit_amount) AS Losses
FROM transactions
GROUP BY YEAR(Value_date);
| [
(2022, Decimal('211175202')),
(2023, Decimal('575324140')),
(2024, Decimal('490771857')),
(2021, Decimal('906602921')),
(2020, Decimal('1076993185'))
] | You lost 497766 in 2021, 272458 in 2022, -340550 in 2023, and -148114 in 2024. | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
What is the average of last 5 transactions? | SELECT AVG(CASE WHEN Withdrawal_amount IS NOT NULL THEN Withdrawal_amount ELSE Deposit_amount END) AS Average_Amount FROM (SELECT Withdrawal_amount, Deposit_amount FROM transactions ORDER BY Date DESC LIMIT 5) AS Last5Transactions | null | null | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
What is my total income this year? | SELECT SUM(Deposit_amount) AS Total_Income FROM transactions WHERE YEAR(Value_date) = YEAR(CURRENT_DATE()) | null | null | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
What is my income of the first 3 months of this year? | SELECT SUM(Deposit_amount) AS Total_Income FROM transactions WHERE YEAR(Value_date) = YEAR(CURRENT_DATE()) AND MONTH(Value_date) IN (1, 2, 3) | null | null | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
What is my expenses of the first 4 months of this year? | SELECT SUM(Withdrawal_amount) AS Total_Expenses FROM transactions WHERE YEAR(Value_date) = YEAR(CURRENT_DATE()) AND MONTH(Value_date) IN (1, 2, 3, 4) | null | null | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
What is my income of the last 5 months of this year? | SELECT SUM(Deposit_amount) AS Total_Income FROM transactions WHERE Value_date >= DATE_SUB(CURRENT_DATE(), INTERVAL 5 MONTH) | null | null | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
How much amount did I earn each year? | SELECT YEAR(Value_date) AS Year, SUM(Deposit_amount) AS Total_Income FROM transactions GROUP BY YEAR(Value_date) | null | null | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
How much amount did I save each year? | SELECT YEAR(Value_date) AS Year, SUM(Deposit_amount) - SUM(Withdrawal_amount) AS Savings FROM transactions GROUP BY YEAR(Value_date) | null | null | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
How much amount did I spend each year? | SELECT YEAR(Value_date) AS Year, SUM(Withdrawal_amount) AS Total_Spending FROM transactions GROUP BY YEAR(Value_date) | null | null | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
Give me the breakdown of expenses of each day of this week? | SELECT DATE(Value_date) AS Date, SUM(Withdrawal_amount) AS Total_Expenses FROM transactions WHERE Value_date >= DATE_SUB(CURRENT_DATE(), INTERVAL 1 WEEK) GROUP BY DATE(Value_date) | null | null | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
Give me the breakdown of savings of each day of this month? | SELECT DATE(Value_date) AS Date, SUM(Deposit_amount) - SUM(Withdrawal_amount) AS Daily_Savings FROM transactions WHERE MONTH(Value_date) = MONTH(CURRENT_DATE()) AND YEAR(Value_date) = YEAR(CURRENT_DATE()) GROUP BY DATE(Value_date) | null | null | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
Give me the breakdown of amount I spent each day of this month? | SELECT DATE(Value_date) AS Date, SUM(Withdrawal_amount) AS Daily_Spending FROM transactions WHERE MONTH(Value_date) = MONTH(CURRENT_DATE()) AND YEAR(Value_date) = YEAR(CURRENT_DATE()) GROUP BY DATE(Value_date) | null | null | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
Give me the breakdown of amount I spent each day of this week? | SELECT DATE(Value_date) AS Date, SUM(Withdrawal_amount) AS Daily_Spending FROM transactions WHERE Value_date >= DATE_SUB(CURRENT_DATE(), INTERVAL 1 WEEK) GROUP BY DATE(Value_date) | null | null | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
On average how much amount I spent each day? | SELECT AVG(Withdrawal_amount) AS Average_Daily_Spending FROM transactions | null | null | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
On average how much amount I spent each month? | SELECT YEAR(Value_date) AS Year, MONTH(Value_date) AS Month, AVG(SUM(Withdrawal_amount)) OVER (PARTITION BY YEAR(Value_date), MONTH(Value_date)) AS Average_Monthly_Spending FROM transactions GROUP BY YEAR(Value_date), MONTH(Value_date) | null | null | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
On average how much amount I spent each year? | SELECT YEAR(Value_date) AS Year, AVG(SUM(Withdrawal_amount)) OVER (PARTITION BY YEAR(Value_date)) AS Average_Yearly_Spending FROM transactions GROUP BY YEAR(Value_date) | null | null | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
How many transactions did I make this year? | SELECT COUNT(*) AS Total_Transactions FROM transactions WHERE YEAR(Value_date) = YEAR(CURRENT_DATE()) | null | null | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
How many transactions did I make each year? | SELECT YEAR(Value_date) AS Year, COUNT(*) AS Total_Transactions FROM transactions GROUP BY YEAR(Value_date) | null | null | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
How many transactions did I make this week? | SELECT COUNT(*) AS Total_Transactions FROM transactions WHERE WEEK(Value_date) = WEEK(CURRENT_DATE()) AND YEAR(Value_date) = YEAR(CURRENT_DATE()) | null | null | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
How many transactions did I make this month? | SELECT COUNT(*) AS Total_Transactions FROM transactions WHERE MONTH(Value_date) = MONTH(CURRENT_DATE()) AND YEAR(Value_date) = YEAR(CURRENT_DATE()) | null | null | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
What is my total savings of last month? | SELECT SUM(Deposit_amount) - SUM(Withdrawal_amount) AS Total_Savings FROM transactions WHERE YEAR(Value_date) = YEAR(CURRENT_DATE - INTERVAL 1 MONTH) AND MONTH(Value_date) = MONTH(CURRENT_DATE - INTERVAL 1 MONTH) | null | null | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
What is my total savings of each year? | SELECT YEAR(Value_date) AS Year, SUM(Deposit_amount) - SUM(Withdrawal_amount) AS Total_Savings FROM transactions GROUP BY YEAR(Value_date) | null | null | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
What is my savings this week? | SELECT SUM(Deposit_amount) - SUM(Withdrawal_amount) AS Total_Savings FROM transactions WHERE WEEK(Value_date) = WEEK(CURRENT_DATE()) AND YEAR(Value_date) = YEAR(CURRENT_DATE()) | null | null | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
What is my expenses amount of last month? | SELECT SUM(Withdrawal_amount) AS Total_Expenses FROM transactions WHERE YEAR(Value_date) = YEAR(CURRENT_DATE - INTERVAL 1 MONTH) AND MONTH(Value_date) = MONTH(CURRENT_DATE - INTERVAL 1 MONTH) | null | null | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
What is my expenses amount of this month? | SELECT SUM(Withdrawal_amount) AS Total_Expenses FROM transactions WHERE YEAR(Value_date) = YEAR(CURRENT_DATE()) AND MONTH(Value_date) = MONTH(CURRENT_DATE()) | null | null | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
What is my current net worth as my account number is 234234 | SELECT Balance_amount AS Current_Net_Worth FROM transactions where Account_no = "234234" ORDER BY Value_date DESC LIMIT 1 | null | null | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
What is my income of the last 2 years? | SELECT YEAR(Value_date) AS Year, SUM(Deposit_amount) AS Total_Income FROM transactions WHERE Value_date >= DATE_SUB(CURDATE(), INTERVAL 2 YEAR) GROUP BY YEAR(Value_date) | null | null | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
What is my expenses of the last 1 year? | SELECT YEAR(Value_date) AS Year, SUM(Withdrawal_amount) AS Total_Expenses FROM transactions WHERE Value_date >= DATE_SUB(CURDATE(), INTERVAL 1 YEAR) GROUP BY YEAR(Value_date) | null | null | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
What is my savings of the last 3 years? | SELECT YEAR(Value_date) AS Year, SUM(Deposit_amount) - SUM(Withdrawal_amount) AS Net_Savings FROM transactions WHERE Value_date >= DATE_SUB(CURDATE(), INTERVAL 3 YEAR) GROUP BY YEAR(Value_date) | null | null | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
Give me the income of the first 7 months of this year | SELECT MONTH(Value_date) AS Month, SUM(Deposit_amount) AS Total_Income
FROM transactions
WHERE YEAR(Value_date) = YEAR(CURRENT_DATE())
AND MONTH(Value_date) <= 7
GROUP BY MONTH(Value_date) | null | null | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
Tell me the expenses of the first 9 months of this year | SELECT MONTH(Value_date) AS Month, SUM(Withdrawal_amount) AS Total_Expenses
FROM transactions
WHERE YEAR(Value_date) = YEAR(CURRENT_DATE())
AND MONTH(Value_date) <= 9
GROUP BY MONTH(Value_date) | null | null | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
Tell me the income of the last 8 months of this year | SELECT MONTH(Value_date) AS Month, SUM(Deposit_amount) AS Total_Income
FROM transactions
WHERE YEAR(Value_date) = YEAR(CURRENT_DATE())
AND MONTH(Value_date) >= (MONTH(CURRENT_DATE()) - 7)
GROUP BY MONTH(Value_date) | null | null | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
What is my average spendings each month in this year | SELECT MONTH(Value_date) AS Month, AVG(Withdrawal_amount) AS Average_Spending
FROM transactions
WHERE YEAR(Value_date) = YEAR(CURRENT_DATE())
GROUP BY MONTH(Value_date) | null | null | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
Give me the average spendings of mine each month in previous year | SELECT MONTH(Value_date) AS Month, AVG(Withdrawal_amount) AS Average_Spending
FROM transactions
WHERE YEAR(Value_date) = YEAR(CURRENT_DATE()) - 1
GROUP BY MONTH(Value_date) | null | null | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
Give me the average spendings of mine each month in year 2022 | SELECT MONTH(Value_date) AS Month, AVG(Withdrawal_amount) AS Average_Spending
FROM transactions
WHERE YEAR(Value_date) = 2022
GROUP BY MONTH(Value_date) | null | null | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
What is my average spendings each week in this month | SELECT WEEK(Value_date) AS Week, AVG(Withdrawal_amount) AS Average_Spending
FROM transactions
WHERE YEAR(Value_date) = YEAR(CURRENT_DATE())
AND MONTH(Value_date) = MONTH(CURRENT_DATE())
GROUP BY WEEK(Value_date) | null | null | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
What is my average spendings each week previous month | SELECT WEEK(Value_date) AS Week, AVG(Withdrawal_amount) AS Average_Spending
FROM transactions
WHERE YEAR(Value_date) = YEAR(CURRENT_DATE())
AND MONTH(Value_date) = MONTH(CURRENT_DATE()) - 1
GROUP BY WEEK(Value_date) | null | null | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
What is my average earning each month in this year? | SELECT MONTH(Value_date) AS Month, AVG(Deposit_amount) AS Average_Earning
FROM transactions
WHERE YEAR(Value_date) = YEAR(CURRENT_DATE())
GROUP BY MONTH(Value_date) | null | null | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
Tell me the earnings each month in the previous year | SELECT MONTH(Value_date) AS Month, SUM(Deposit_amount) AS Total_Earnings
FROM transactions
WHERE YEAR(Value_date) = YEAR(CURRENT_DATE()) - 1
GROUP BY MONTH(Value_date) | null | null | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
What is my earnings each month in the year 2018? | SELECT MONTH(Value_date) AS Month, SUM(Deposit_amount) AS Total_Earnings
FROM transactions
WHERE YEAR(Value_date) = 2018
GROUP BY MONTH(Value_date) | null | null | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
What is my average earning each week in this month? | SELECT WEEK(Value_date) AS Week, AVG(Deposit_amount) AS Average_Earning
FROM transactions
WHERE YEAR(Value_date) = YEAR(CURRENT_DATE())
AND MONTH(Value_date) = MONTH(CURRENT_DATE())
GROUP BY WEEK(Value_date) | null | null | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
What were my earnings each week in the previous month? | SELECT WEEK(Value_date) AS Week, SUM(Deposit_amount) AS Total_Earnings
FROM transactions
WHERE YEAR(Value_date) = YEAR(CURRENT_DATE())
AND MONTH(Value_date) = MONTH(CURRENT_DATE()) - 1
GROUP BY WEEK(Value_date) | null | null | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
What was my net worth previous year? | SELECT (SUM(Deposit_amount) - SUM(Withdrawal_amount)) AS Net_Worth
FROM transactions
WHERE YEAR(Value_date) = YEAR(CURRENT_DATE()) - 1 | null | null | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
What is my net worth this year? | SELECT (SUM(Deposit_amount) - SUM(Withdrawal_amount)) AS Net_Worth
FROM transactions
WHERE YEAR(Value_date) = YEAR(CURRENT_DATE()) | null | null | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
What was my bank balance in year 2021? | SELECT Balance_amount
FROM transactions
WHERE YEAR(Value_date) = 2021
ORDER BY Value_date DESC
LIMIT 1 | null | null | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
How much money did I spend this year? | SELECT SUM(Withdrawal_amount) AS Total_Spending
FROM transactions
WHERE YEAR(Value_date) = YEAR(CURRENT_DATE()) | null | null | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
How much money did I spend till now? | SELECT SUM(Withdrawal_amount) AS Total_Spending
FROM transactions | null | null | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
How much money did I spend this week? | SELECT SUM(Withdrawal_amount) AS Total_Spending
FROM transactions
WHERE YEARWEEK(Value_date, 1) = YEARWEEK(CURRENT_DATE(), 1) | null | null | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
How much money did I spend previous week? | SELECT SUM(Withdrawal_amount) AS Total_Spending
FROM transactions
WHERE YEARWEEK(Value_date, 1) = YEARWEEK(CURRENT_DATE(), 1) - 1 | null | null | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
How much money did I spend this month? | SELECT SUM(Withdrawal_amount) AS Total_Spending
FROM transactions
WHERE YEAR(Value_date) = YEAR(CURRENT_DATE())
AND MONTH(Value_date) = MONTH(CURRENT_DATE()) | null | null | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
How much money did I spend last month? | SELECT SUM(Withdrawal_amount) AS Total_Spending
FROM transactions
WHERE YEAR(Value_date) = YEAR(CURRENT_DATE())
AND MONTH(Value_date) = MONTH(CURRENT_DATE()) - 1 | null | null | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
What is my highest spending month this year? | SELECT MONTH(Value_date) AS Month, SUM(Withdrawal_amount) AS Total_Spending
FROM transactions
WHERE YEAR(Value_date) = YEAR(CURRENT_DATE())
GROUP BY MONTH(Value_date)
ORDER BY Total_Spending DESC
LIMIT 1 | null | null | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
What is my highest earning month this year? | SELECT MONTH(Value_date) AS Month, SUM(Deposit_amount) AS Total_Earnings
FROM transactions
WHERE YEAR(Value_date) = YEAR(CURRENT_DATE())
GROUP BY MONTH(Value_date)
ORDER BY Total_Earnings DESC
LIMIT 1 | null | null | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
What is my lowest spending month this year? | SELECT MONTH(Value_date) AS Month, SUM(Withdrawal_amount) AS Total_Spending
FROM transactions
WHERE YEAR(Value_date) = YEAR(CURRENT_DATE())
GROUP BY MONTH(Value_date)
ORDER BY Total_Spending ASC
LIMIT 1 | null | null | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
What is my lowest earning month this year? | SELECT MONTH(Value_date) AS Month, SUM(Deposit_amount) AS Total_Earnings
FROM transactions
WHERE YEAR(Value_date) = YEAR(CURRENT_DATE())
GROUP BY MONTH(Value_date)
ORDER BY Total_Earnings ASC
LIMIT 1 | null | null | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
What is my average monthly income this year ? | SELECT AVG(Total_Earnings) AS Average_Income
FROM (
SELECT SUM(Deposit_amount) AS Total_Earnings
FROM transactions
WHERE YEAR(Value_date) = YEAR(CURRENT_DATE())
GROUP BY MONTH(Value_date)
) ... | null | null | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
What is my average monthly spending this year? | SELECT AVG(Total_Spending) AS Average_Spending
FROM (
SELECT SUM(Withdrawal_amount) AS Total_Spending
FROM transactions
WHERE YEAR(Value_date) = YEAR(CURRENT_DATE())
GROUP BY MONTH(Value_date)
... | null | null | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
What is my largest transaction this year? | SELECT Value_date,MAX(Withdrawal_amount) AS Highest_Transaction_Amount
FROM transactions
WHERE YEAR(Value_date) = YEAR(CURRENT_DATE())
group by Value_date order by Highest_Transaction_Amount desc limit 1; | null | null | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
What is my smallest transaction this year? | SELECT Value_date,Min(Withdrawal_amount) AS Highest_Transaction_Amount
FROM transactions
WHERE YEAR(Value_date) = YEAR(CURRENT_DATE())
group by Value_date order by Highest_Transaction_Amount desc limit 1; | null | null | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
How many deposits did I make this year? | SELECT COUNT(*) AS Total_Deposits
FROM transactions
WHERE YEAR(Value_date) = YEAR(CURRENT_DATE())
AND Deposit_amount IS NOT NULL | null | null | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
How many withdrawals did I make this year? | SELECT COUNT(*) AS Total_Withdrawals
FROM transactions
WHERE YEAR(Value_date) = YEAR(CURRENT_DATE())
AND Withdrawal_amount IS NOT NULL | null | null | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
What is my total balance at the end of each year? | SELECT YEAR(Value_date) AS Year, Balance_amount
FROM transactions
WHERE Value_date IN (
SELECT MAX(Value_date)
FROM transactions
GROUP BY YEAR(Value_date)
)
GROUP BY YEAR(Valu... | null | null | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
What is my highest balance this year? | SELECT MAX(Balance_amount) AS Highest_Balance
FROM transactions
WHERE YEAR(Value_date) = YEAR(CURRENT_DATE()) | null | null | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
What is my lowest balance this year? | SELECT MIN(Balance_amount) AS Lowest_Balance
FROM transactions
WHERE YEAR(Value_date) = YEAR(CURRENT_DATE()) | null | null | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
How many transactions were above $1000 this year? | SELECT COUNT(*) AS High_Value_Transactions
FROM transactions
WHERE YEAR(Value_date) = YEAR(CURRENT_DATE())
AND (Withdrawal_amount > 1000 OR Deposit_amount > 1000) | null | null | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
How many transactions were below $100 this year? | SELECT COUNT(*) AS Low_Value_Transactions
FROM transactions
WHERE YEAR(Value_date) = YEAR(CURRENT_DATE())
AND (Withdrawal_amount < 100 OR Deposit_amount < 100) | null | null | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
What is the average balance in my account this year? | SELECT AVG(Balance_amount) AS Average_Balance
FROM transactions
WHERE YEAR(Value_date) = YEAR(CURRENT_DATE()) | null | null | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
How many days did I have a balance below $500 this year? | SELECT COUNT(DISTINCT Value_date) AS Days_Below_500
FROM transactions
WHERE YEAR(Value_date) = YEAR(CURRENT_DATE())
AND Balance_amount < 500 | null | null | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
How many days did I have a balance above $5000 this year? | SELECT COUNT(DISTINCT Value_date) AS Days_Above_5000
FROM transactions
WHERE YEAR(Value_date) = YEAR(CURRENT_DATE())
AND Balance_amount > 5000 | null | null | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
How much did I spend on the highest spending day this year? | SELECT MAX(Total_Spending) AS Highest_Spending_Day
FROM (
SELECT SUM(Withdrawal_amount) AS Total_Spending
FROM transactions
WHERE YEAR(Value_date) = YEAR(CURRENT_DATE())
GROUP BY DATE(Value_date)
... | null | null | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
How much did I earn on the highest earning day this year? | SELECT MAX(Total_Earnings) AS Highest_Earning_Day
FROM (
SELECT SUM(Deposit_amount) AS Total_Earnings
FROM transactions
WHERE YEAR(Value_date) = YEAR(CURRENT_DATE())
GROUP BY DATE(Value_date)
... | null | null | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
What is my total income from last year? | SELECT SUM(Deposit_amount) AS Total_Income
FROM transactions
WHERE YEAR(Value_date) = YEAR(CURRENT_DATE()) - 1 | null | null | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
What is my total spending from last year? | SELECT SUM(Withdrawal_amount) AS Total_Spending
FROM transactions
WHERE YEAR(Value_date) = YEAR(CURRENT_DATE()) - 1 | null | null | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
What is the average daily spending in the last month? | SELECT AVG(Daily_Spending) AS Average_Daily_Spending
FROM (
SELECT DATE(Value_date) AS Date, SUM(Withdrawal_amount) AS Daily_Spending
FROM transactions
WHERE Value_date >= DATE_SUB(CURRENT_DATE(), INTERVAL 1 MONTH)
... | null | null | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
What is the average daily income in the last month? | SELECT AVG(Daily_Income) AS Average_Daily_Income
FROM (
SELECT DATE(Value_date) AS Date, SUM(Deposit_amount) AS Daily_Income
FROM transactions
WHERE Value_date >= DATE_SUB(CURRENT_DATE(), INTERVAL 1 MONTH)
GRO... | null | null | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
What is my largest withdrawal amount this year? as my account number is 409000425051 | SELECT MAX(Withdrawal_amount) AS Largest_Withdrawal
FROM transactions
WHERE YEAR(Value_date) = YEAR(CURRENT_DATE())
And Account_no='409000425051' | null | null | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
What is my largest deposit amount this year? | SELECT MAX(Deposit_amount) AS Largest_Deposit
FROM transactions
WHERE YEAR(Value_date) = YEAR(CURRENT_DATE()) | null | null | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
How much did I save in total last year? | SELECT SUM(Deposit_amount) - SUM(Withdrawal_amount) AS Total_Savings
FROM transactions
WHERE YEAR(Value_date) = YEAR(CURRENT_DATE()) - 1 | null | null | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
How much did I save in total this year? | SELECT SUM(Deposit_amount) - SUM(Withdrawal_amount) AS Total_Savings
FROM transactions
WHERE YEAR(Value_date) = YEAR(CURRENT_DATE()) | null | null | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
How much did I save each month this year? | SELECT MONTH(Value_date) AS Month, SUM(Deposit_amount) - SUM(Withdrawal_amount) AS Monthly_Savings
FROM transactions
WHERE YEAR(Value_date) = YEAR(CURRENT_DATE())
GROUP BY MONTH(Value_date) | null | null | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
What is the average monthly savings this year? | SELECT AVG(Monthly_Savings) AS Average_Monthly_Savings
FROM (
SELECT MONTH(Value_date) AS Month, SUM(Deposit_amount) - SUM(Withdrawal_amount) AS Monthly_Savings
FROM transactions
WHERE YEAR(Value_date) = YEAR(CURRENT_DATE())
... | null | null | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
What is my net income this year? | SELECT SUM(Deposit_amount) - SUM(Withdrawal_amount) AS Net_Income
FROM transactions
WHERE YEAR(Value_date) = YEAR(CURRENT_DATE()) | null | null | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
What is my net income last year? | SELECT SUM(Deposit_amount) - SUM(Withdrawal_amount) AS Net_Income
FROM transactions
WHERE YEAR(Value_date) = YEAR(CURRENT_DATE()) - 1 | null | null | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
What is the total number of deposits this year? | SELECT COUNT(*) AS Total_Deposits
FROM transactions
WHERE YEAR(Value_date) = YEAR(CURRENT_DATE()) AND Deposit_amount IS NOT NULL | null | null | <s>[INST] <<SYS>> You are an expert in converting natural anguages into MYSQL queries. Here is the database schema defined by create statement. CREATE TABLE transactions ( `Account_No` VARCHAR(50) NOT NULL, `Transaction_details` TEXT, `Withdrawal_amount` INTEGER, `Deposit_amount` INTEGER, `Balance_amount` INTEGER, `Val... |
End of preview. Expand in Data Studio
No dataset card yet
- Downloads last month
- 4