0

I need to save statistics from past 7 days. But tomorrow I need to remove or replace data that was saving 8 days ago. I was thinking about having a table with 8 columns (name + 7 days) and every night remove last one and create new but it sound bad. What is the best way to do this?

Shadow
  • 33,525
  • 10
  • 51
  • 64
  • 1
    When you add new data, you add it though new records, not via rotating data in columns. – Shadow Jan 29 '21 at 01:19
  • Why not simply store all statistics? Failing that, three columns (name, date, value), 7 rows, and update the oldest one – Strawberry Jan 29 '21 at 07:05

0 Answers0