Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Rolling SUM
- CREATE TABLE f_FoodTruck_Transactions
- (
- food_truck_id INT,
- paid_amount FLOAT,
- date_of_purchase DATE,
- datecreated datetime DEFAULT CURRENT_TIMESTAMP
- );
- INSERT INTO f_FoodTruck_Transactions VALUES
- (1,10.2,'2018-01-01','2018-01-01'),
- (1,36.32,'2018-01-02','2018-01-02'),
- (1,120.19,'2018-01-03','2018-01-03'),
- (1,130.24,'2018-01-04','2018-01-04'),
- (1,210.42,'2018-01-05','2018-01-05'),
- (2,50.9,'2018-01-01','2018-01-01'),
- (2,110.52,'2018-01-02','2018-01-02'),
- (2,50.29,'2018-01-03','2018-01-03'),
- (2,70.12,'2018-01-04','2018-01-04'),
- (2,90.2,'2018-01-05','2018-01-05'),
- (2,110.33,'2018-01-06','2018-01-06')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement