Usuarios con 10 o más preguntas sin aceptar

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow en español

Preguntas y respuestas para programadores y profesionales de la informática

select U.id,
       U.DisplayName,
       count(case when P.AcceptedAnswerId is null then 1 else null end) as PreguntasSinAceptar,
       count(case when P.AcceptedAnswerId is not null then 1 else null end) as PreguntasAceptadas
  from Users U
  inner join Posts P
        on U.id = P.OwnerUserId
  where P.PostTypeId = 1 
        and P.AnswerCount > 0 
  group by U.id,
           U.DisplayName
  having count(case when P.AcceptedAnswerId is null then 1 else null end) >= 10
  order by 3 desc;

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results