Q&A for gamemasters and players of tabletop, paper-and-pencil role-playing games
declare @tagToSearch nvarchar(35) = ##Tag:string?google-api##; declare @offset date = dateadd(##Period?month##, ##Offset?-1##, getdate()); select datefromparts( datepart(year, CreationDate), datepart(month, CreationDate), 1 ) as Created, count(Id) as [Questions Posted] from Posts where PostTypeId = 1 and CreationDate >= @offset and charindex('<' + @tagToSearch + '>', Tags) > 0 and ( Tags like '%<google-%-api>%' or Tags like '%<google-custom-search>%' or Tags like '%<google-tag-manager>%' or Tags like '%<google-tasks-api>%' or Tags like '%<google-api-webmasters>%' or Tags like '%<adsense-api>%' or Tags like '%<google-compute-api>%' or Tags like '%<google-bigquery>%' or Tags like '%<google-cloud-dataflow>%' or Tags like '%<google-genomics>%' or Tags like '%<google-fit>%' or Tags like '%<google-maps-api-3>%' or Tags like '%<google-my-business-api>%' or Tags like '%<google-static-maps>%' or Tags like '%<google-license-manager>%' or Tags like '%<google-groups-migration>%' or Tags like '%<google-groups-settings>%' or Tags like '%<youtube-api>%' or Tags like '%<youtube-data-api>%' or Tags like '%<gmail-api>%' ) group by datefromparts( datepart(year, CreationDate), datepart(month, CreationDate), 1 ) order by Created desc