The average response time for most popular tags (with at least one vote)
Q&A about the site for builders and users of networked sensors and control devices in the contexts of smart homes, industry automation, or environmental sensors
-- Average response time by tags
-- The average response time for most popular tags (with at least one vote)
declare @limit int = 200;
declare @tag_name nvarchar(35) = 'snowflake-cloud-data-platform';
declare @tag_id int = (select id from tags where tagname = @tag_name);
count(distinct Id) as responses
, avg(datediff(hour,CreationDate, ClosedDate)) as average_response_time_in_hours
-- and PostTypeId = 2 --answers only
CreationDate >= '2020-09-21'
and ClosedDate <='2020-09-28'