How can select the last records added in 5 seconds, 5 minutes, 5 hours, 5 days, 5 weeks, 5 months, 5 years in one query?
Is it possible to be selected in one query?
sample records include
name | added_timestamp
v | last_five_minutes
k | last_hour
l | last_hour
the timestamps can be pseudo for the actual time
Although you haven’t stated it, I suspect you want totals for the various time periods:
Edited: Added alternative prompted by comment
If you want the actual records, this will categorize them: