SELECT CASE WHEN p.posttypeid = 1 THEN 'Question' ELSE 'A...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Webmasters

Q&A for pro webmasters

SELECT 
--p.Id AS [Post Link],
CASE WHEN p.posttypeid = 1 
     THEN 'Question' 
     ELSE 'Answer' 
     END [Q/A],
--CONVERT(VARCHAR(6),CreationDate,112) AS yearmonth,
COUNT(*) as count_questions
--p.title, p.body
--p.*
FROM Posts p
WHERE (p.tags like '%<google-maps>%'
 OR p.tags like '%<mapbox>%'
 OR p.tags like '%<openstreetmap>%' )
AND p.posttypeid = 1
AND p.CreationDate >= '2020-01-01'
GROUP BY CASE WHEN p.posttypeid = 1 
     THEN 'Question' 
     ELSE 'Answer' 
     END
ORDER BY 1 DESC

Enter Parameters

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