How do I delete every row except the last one for each day?
Posted
by A B
on Stack Overflow
See other posts from Stack Overflow
or by A B
Published on 2010-05-07T18:19:04Z
Indexed on
2010/05/07
18:28 UTC
Read the original article
Hit count: 119
I have a table with stock quotes that looks something like this:
id, date, stock_id, value
Every day has several rows for each stock_id (it is automatically updated every five minutes), so the table is rather big at the moment.
How do i delete every row but the last one each day for every stock_id?
© Stack Overflow or respective owner