How to Create 15 minute SQL Interval?

Asked

Viewed 434 times

2

I have a field timestamp and I need to create an interval every 15 minutes.

How in Sql I should do this ?

Data  = YYYY/MM/DD HH:MM:SS

The purpose is an analysis where I need the amount of products sold every 15 minutes the day before.

  • Would it be a group by every 15 minutes? If so, try GROUP BY FLOOR(data / 100) % 10000 *15

  • It would be a group by every 15 minutes and day. I will try this solution.

  • 2

    What did you try to do? is which database is sql server or mysql?

  • would be something like date/time units 29/9/16 00:15 17 29/9/16 00:30 45 29/9/16 00:45 67 ... 29/9/16 15:15 117 ?

  • I think contradictory tags are missing.

  • Hello Mota, it’s actually in Neteza but here doesn’t have the tag, that’s why I put the two comics. It is an OLAP report where I need to measure every 15 minutes per day. 20:00 - 20:15 - 20:30 and etc. Thank you.

Show 1 more comment
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.