Q&A for scientists using computers to solve scientific problems
WITH Answers AS ( SELECT ParentId AS Id, SUM(Score) AS Score FROM Posts WHERE PostTypeId = 2 GROUP BY ParentId ) SELECT CONCAT('http://es.stackoverflow.com/q/',Q.Id,'/127|',Q.Title) URL, Q.AnswerCount "Cantidad de Respuestas", Q.Score "Puntuaje de Pregunta", A.Score "Puntaje de Respuestas", 133*Q.Score/(Q.Score+A.Score)-33 "Elegancia" FROM Posts Q LEFT OUTER JOIN Answers A ON Q.Id = A.Id WHERE Q.PostTypeId = 1 AND Q.AnswerCount > 0 AND Q.AcceptedAnswerId > 0 AND Q.ClosedDate IS NULL AND A.Score > 0 AND Q.Score > 0 AND 3*Q.Score >= A.Score+Q.Score ORDER BY 100*Q.Score/A.Score+Q.Score DESC, Q.AnswerCount DESC, Q.Score DESC, A.Score DESC, Q.Title ASC ;