I have the following database
id | userid | productid | specialid | buydate (timestamp in this sample as YYYY-MM-DD) 1 | 1 | 1 | 1 | 2020-12-01 2 | 2 | 1 | 3 | 20