Count number of visits except the ones from 2 biggest visitors with SQL
<p>I have a website visits database table:</p>

<pre><code>date               ip   
2016/05/12 08:12   26.123.123.2
2016/05/12 08:13   26.123.123.2
2016/05/12 08:20   7.8.13.34
2016/05/12 08:21   1.2.177.9
2016/05/12 08:22   26.123.123.2
2016/05/12 08:40   7.8.13.34
</code></pre>

<p>I count the number of visits with:</p>

<pre><code>select count(ip) from visits where date(date) = date(...)
</code></pre>

<p>Now I want to count <strong>the number of visits made by everyone <em>except the two IP who have the most visits</em></strong>.</p>

<p><em>Example: here the IP with most visits are 26.123.123.2 and 7.8.13.34, and thus should not be counted. The result should be = 1 here.</em></p>

<p>How to count this with SQL?</p>