导入数据:
Create table If Not Exists Products (product_id int, new_price int, change_date date); Truncate table Products; insert into Products (product_id, new_price, change_date) values ('1', '20', '2019-08-14'); insert into Products (product_id, new_price, change_date) values ('2', '50', '2019-08-14'); insert into Products (product_id, new_price, change_date) values ('1', '30', '2019-08-15'); insert into Products (product_id, new_price, change_date) values ('1', '35', '2019-08-16'); insert into Products (product_id, new_price, change_date) values ('2', '65', '2019-08-17'); insert into Products (product_id, new_price, change_date) values ('3', '20', '2019-08-18');
产品数据表: Products
+---------------+---------+ | Column Name | Type | +---------------+---------+ | product_id | int | | new_price