Hi,
I have a database table with entries looking like that
id | email | type | datetime
1 | a@b.com | x | 2007-03-24
3 | a@b.com | x | 2008-03-10
4 | x@y.com | y | 2007-04-27
8 | a@b.com | ...
http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/Q_23242475.html