SQL check if data is sampled
<p>I have a database with data that has x different filters and an angle between -180 to 180. I'd like to check if a certain filter has atleast one datapoint in a range of 5 degrees. So yes or 1 if there is a datapoint between -180 and -175 for filter 1.</p>

<p>I've managed to count the amount of items per filter in total</p>

<pre><code>'SELECT COUNT(data),filt FROM database GROUP BY filt ORDER BY filt'
</code></pre>

<p>This gives:</p>

<pre><code>(11093, 'R1')
(24067, 'R2')
(12234, 'R3')
(4, 'RH2')
(12888, 'SIC')
(7557, 'SI')
(1570, 'SI2')
(2922, 'SI3')
</code></pre>

<p>But I have no idea how to take the next step</p>