Ver originalSELECT MAX(ID), TIPOFROM tablaWHERE '20100408' <= [Fecha Final]AND [fecha de inicio] >= '20100101'GROUP BY TIPO