SELECT CASE WHEN p.tags like '%<google-maps>%' THEN 'goog...

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.tags like '%<google-maps>%'
     THEN 'google-map'
     WHEN p.tags like '%<mapbox>%'
     THEN 'mapbox'
     WHEN p.tags like '%<openstreetmap>%'
     THEN 'OSM'
     ELSE 'Other'
     END AS mapprovider,
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 IN (1,2)
--  AND p.CreationDate >= '2020-01-01'
GROUP BY 
  CASE WHEN p.tags like '%<google-maps>%'
       THEN 'google-map'
       WHEN p.tags like '%<mapbox>%'
       THEN 'mapbox'
       WHEN p.tags like '%<openstreetmap>%'
       THEN 'OSM'
       ELSE 'Other'
       END,
  CASE WHEN p.posttypeid = 1 
       THEN 'Question' 
       ELSE 'Answer' 
       END
ORDER BY 3 DESC

Enter Parameters

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