Performance for the last 30 days


Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow em Português

Perguntas e respostas para programadores profissionais e entusiastas

Select a.Id, a.CreationDate, a.DisplayName, a.Title, a.Tags, a.Link, b.UpMod as Upvote, b.DownMod as DownVote, b.AcceptedByOriginator as Accepted
(Select Distinct a.Id, a.CreationDate, u.DisplayName, p.Title, p.Tags, 
   CONCAT('', p.Id, '#answer-', a.Id) as Link
From Posts a 
   Inner Join Posts p On a.ParentId = p.Id 
   Inner Join Users u On a.OwnerUserId = u.Id
   Inner Join PostTags pt on p.Id = Pt.PostId
   Inner Join Tags t on pt.TagId = t.Id
   --Left Join Votes v on a.Id = v.PostId and v.VoteTypeId = 2 
   --Left Join Users vu on v.UserId = vu.Id
Where a.OwnerUserId = 11742502
  And a.PostTypeId = 2  -- Answer
  And p.PostTypeId = 1  -- Question
  And t.TagName in ('google-maps-api-3','google-maps', 'google-maps-api',
  'google-places-api', 'google-static-maps', 'google-street-view',
  'google-geocoding-api', 'google-direction', 'google-distancematrix-api',
  'google-maps-android-api-2', 'google-maps-sdk-ios', 'google-maps-embed',
  'google-maps-mobile', 'google-geolocation', 'google-maps-timezone',
  'google-elevation-api', 'google-roads-api')
  And a.CreationDate >= '2019-07-01' And a.CreationDate <= '2019-07-31'  -- 30 days answers 
  ) a Left Join (
  SELECT v.PostID as Id, vt.Name, COUNT(*) AS CNT
     Posts p
       INNER JOIN Votes v
         ON v.PostId = p.Id
       INNER JOIN VoteTypes vt
         ON v.VoteTypeId = vt.Id
     p.OwnerUserId = 11742502
  vt.Name, v.PostID) s_tab pivot (min(CNT)for [Name] in ([UpMod], [DownMod],[AcceptedByOriginator]))AS PVT
  ) b on a.Id = b.Id
  Order by a.DisplayName, a.CreationDate desc

Enter Parameters

Switch sites:
loading Hold tight while we fetch your results