Quantcast
Channel: GSAK Forum
Viewing all articles
Browse latest Browse all 75560

Filter oldest Cache of each State/County by lignumaqua - 2013-08-28

$
0
0
This should do it:

CODE
code in (select code from caches as c1 where not(archived) and (select count(*) from caches as c2 where c1.county=c2.county and c2.placeddate < c1.placeddate and not(archived)) < 3)


Notes:

1. It actually filters to the oldest three dates, rather than caches. This may produce more than three caches if they have the same placed date.

2. It will be noticeably slower than the previous query.

Viewing all articles
Browse latest Browse all 75560

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>