<p>I have a table with a "Date" column.  Each Date may appear multiple times.  How do I select only the dates that appear &lt; k number of times?</p>

```
```
SELECT * FROM [MyTable] WHERE [Date] IN
(
    SELECT [Date] 
    FROM [MyTable] 
    GROUP By [Date] 
    HAVING COUNT(*) < @Max
)
```
```
See @[SQLMenace] 's response also.  It's very similar to this, but depending on your database his JOIN will probably run faster, assuming the optimizer doesn't make the difference moot.