Respostas por questão

0

Please login or register to vote for this query.

(click on this box to dismiss)

DevOps Meta

Q&A about the site for software engineers working on automated testing, continuous delivery, service integration and monitoring, and building SDLC infrastructure

DECLARE @p_date DATETIME
 SET     @p_date = CONVERT( DATETIME, '01 JAN 2012', 106 )


(
SELECT 
q.AnswerCount,
	count(*) numPerguntas,
    avg(ViewCount)
FROM 
	Posts q
where 
	q.postTypeId = 1
    and q.AnswerCount < 5
group by q.AnswerCount
)
UNION
(
SELECT 
5,
	count(*) numPerguntas,
    avg(ViewCount)
FROM 
	Posts q
where 
	q.postTypeId = 1
     and q.AnswerCount >= 5
)
ORDER BY 1

Enter Parameters

Options:
Switch to main site
loading Hold tight while we fetch your results