Calculate the period of validity of the price – Mysql
I have a table with an item, its cost and the date it was added. CREATE TABLE item_prices ( item_id INT, item_name VARCHAR(30), item_price DECIMAL(12, 2), created_dttm DATETIME ); INSERT INTO item_prices(item_id, item_name, item_price, created_dttm) VALUES (1, 'spoon', 10.20 ,…