wiki:dmlScriptVer1.sql

Version 2 (modified by 211101, 3 days ago) ( diff )

--

INSERT INTO USER (user_name, email, password) VALUES
('John Doe', 'john@example.com', 'password123'),
('Jane Smith', 'jane@example.com', 'securepass'),
('Alice Johnson', 'alice@example.com', 'alicepwd');

INSERT INTO TAG (tag_name) VALUES
('Food'),
('Work'),
('Groceries'),
('Entertainment'),
('Bills');

INSERT INTO TRANSACTION_ACCOUNT (account_name, balance, user_id) VALUES
('Cash', 5000.00, 1),
('Bank Account', 20000.00, 1),
('Credit Card', -1000.00, 2),
('Savings', 15000.00, 2),
('Foreign Currency', 300.00, 3);

INSERT INTO TRANSACTION (transaction_name, amount, net_amount, date, tag_id) VALUES
('Bought groceries', 1000.00, 800.00, '23.11.2024 13:51:35 +02:00', 1),
('Paid rent', 15000.00, 15000.00, '01.11.2024 17:01:41 +02:00', 5),
('Dinner with friends', 2500.00, 1500.00, '29.11.2024 22:02:22 +02:00', 2),
('Movie tickets', 600.00, 600.00, '30.11.2024 17:38:00 +02:00', 4),
('Electricity bill', 1200.00, 1200.00, '02.11.2024 07:03:35 +02:00', 5);

INSERT INTO TRANSACTION_BREAKDOWN (transaction_id, transaction_account_id, spent_amount, earned_amount) VALUES
(1, 1, 1000.00, 200.00),  -- Spent 1000 on Cash, earned back 200
(1, 2, 0.00, 800.00),     -- Earned back 800 on Bank Account
(2, 2, 15000.00, 0.00),   -- Spent 15000 on Bank Account for rent
(3, 1, 2500.00, 1000.00), -- Spent 2500 on Cash, earned back 1000
(4, 3, 600.00, 0.00);     -- Spent 600 on Credit Card for movie
Note: See TracWiki for help on using the wiki.