Cita:
Iniciado por Myakire sSQL = "select top 5 count(idtema) as totales from tblcomments where idmain in(select codigo from foromain where privado=true and activar=true) group by idtema order by count(idtema) desc"
weeeee cool!!! Myakire!!!!! no me sabia esa!!!
muchisimas gracias a ti y a todos!! ya tengo lo que queria
sSQL = "select top 5 count(tblcomments.idtema) as totales, tblcomments.idmain, tblcomments.idcategoria, tblcomments.idtema, forotemas.titulo from tblcomments " _
& "inner join forotemas on forotemas.codigo=tblcomments.idtema where tblcomments.idmain in(select codigo from foromain where privado=true and activar=true) " _
& "group by tblcomments.idtema, tblcomments.idmain, tblcomments.idcategoria, tblcomments.idtema, forotemas.titulo order by count(tblcomments.idtema) desc"