Henshall, Stuart - WCP schrieb:
> Hello,
> How about something like:
> DELETE FROM tbl WHERE EXISTS
> (SELECT * FROM tbl AS tbl_b WHERE tbl_b.nr=tbl.nr
> AND tbl_b.stamp<tbl.stamp AND
> tbl_b.stamp>=tbl.stamp-CAST('15 minute' AS interval));
> This may have a problem with the following however:
> nr | stamp
> ---+------
> 1 | 20:45
> 1 | 20:55
> 1 | 21:05
> I am unsure wether this will leave just the 20:45 case or be indeterminate
> (with the alternate leaving the 20:45 and 21:05 entry)
That does not care a very lot in my case - but thanks a lot,
Knut Sübert