Q&A about the site for designers and users of artificial or invented languages, consciously developed instead of having developed naturally
declare @FromDate datetime = '20200101' declare @ToDate datetime = '20210101' select avg(datediff(hour, Q.CreationDate, A.CreationDate)) AllTags, avg(case when Q.tags like '%google-maps%' then datediff(hour, Q.CreationDate, A.CreationDate) end) as GoogleMaps, avg(case when Q.tags like '%mapbox%' then datediff(hour, Q.CreationDate, A.CreationDate) end) as Mapbox, avg(case when Q.tags like '%maps%' then datediff(hour, Q.CreationDate, A.CreationDate) end) as GoogleMaps, avg(case when Q.tags like '%direction%' then datediff(hour, Q.CreationDate, A.CreationDate) end) as GoogleMaps from Posts as Q inner join Posts as A on A.Id = Q.AcceptedAnswerId where Q.CreationDate >= '2020-01-01' and Q.CreationDate < '2021-01-01'