-
Query for fetching data for windows
I have a table “orders” which looks like this:
sym | transactTime | orderId | price | qty
This table will only have the data for 1 day.
now I am provided with two lengths(timespan values) length1: 20 mins , length2: 10 mins
This will be used to create windows, let’s say
window 1:
start:00:00:00:000000000
end: start + length1
window 2:
start: end of window 1 + length2
end: start + length1
this will go on till end=23:59:59:999999999
I need to fetch the data for each sym, for each window.
Can someone help with this?
Log in to reply.