Ver Mensaje Individual
  #2 (permalink)  
Antiguo 21/10/2011, 12:19
Avatar de Libras
Libras
Colaborador
 
Fecha de Ingreso: agosto-2006
Ubicación: En la hermosa perla de occidente
Mensajes: 7.412
Antigüedad: 17 años, 8 meses
Puntos: 774
Respuesta: Modificar consulta SQL


select top 10 total, user_id
from
(
SELECT ((sum(ck_rating_up) - sum(ck_rating_down))*2) +
(SELECT count(comment_id)AS votos FROM wp_comments WHERE comment_approved = 1)
AS total, user_id FROM wp_comments, wp_ck_karma WHERE ck_comment_id = comment_ID
group by user_id) as t1


Algo asi??
__________________
What does an execution plan say to t-sql query? Go f**k yourself, if you are not happy with me