Guest_imported
New member
- Jan 1, 1970
- 0
Hi.
I save stock-quotes in a mysql-database.
Somtimes there are several rows per minutes.
Now i want to plot them on a diagram so i need to get the value of every 10 minutes.
This is my query:
id = Stock id (ERIC B)
tm = time stamp (2001-10-10 15:00:24)
x = stock value (40.20)
select distinct substring(tm,1,16), id, x from index_quote where id = 'ERIC B' and substring(tm,15,2) in ('00','10','20')
I have done do it only shows the rows that came in 00,10,20 minutes. But there are serveral rows per 10 minues step.
How can i do to get 1 row for every 10 minutes?
Does anybody know that?
Please...
Thanks for any help you can give me!
/Dj
I save stock-quotes in a mysql-database.
Somtimes there are several rows per minutes.
Now i want to plot them on a diagram so i need to get the value of every 10 minutes.
This is my query:
id = Stock id (ERIC B)
tm = time stamp (2001-10-10 15:00:24)
x = stock value (40.20)
select distinct substring(tm,1,16), id, x from index_quote where id = 'ERIC B' and substring(tm,15,2) in ('00','10','20')
I have done do it only shows the rows that came in 00,10,20 minutes. But there are serveral rows per 10 minues step.
How can i do to get 1 row for every 10 minutes?
Does anybody know that?
Please...
Thanks for any help you can give me!
/Dj