SQL - First row inserted every day for the past X days
Posted
by okie.floyd
on Stack Overflow
See other posts from Stack Overflow
or by okie.floyd
Published on 2010-06-18T03:39:41Z
Indexed on
2010/06/18
3:43 UTC
Read the original article
Hit count: 244
A tough SQL question (I'm using postgres by the way).
I need the first row inserted every day for the past X days. one of my columns is a timestamp, which i hold the time inserted, and another column is the row id.
If it's not possible to get the first row inserted every day, i at least need a unique one; a single row for every day for the past x days.
Any suggestions?
Thanks
okie
© Stack Overflow or respective owner