questions with tags SQL and javascript that have code snippets

0

Please login or register to vote for this query.

(click on this box to dismiss)

Music Fans

Q&A for music historians, critics, and fans

DECLARE @STARTDATE DATETIME = '2013-01-01'
DECLARE @ENDDATE DATETIME = '2013-12-31'

SELECT cast(Id as varchar(20))+'<postid>'+Body  FROM 
  Posts AS Question 
  where    
  Question.Tags LIKE '%java%' AND 
  Question.Tags not LIKE '%javascript%' and
  Question.Tags not LIKE '%junit%' and
  Question.Tags not LIKE '%apache%' and
  Question.Tags not LIKE '%identityserver%' and
  Question.Tags not LIKE '%json%' and
  Question.Tags not LIKE '%wso%' and
  Question.Tags not LIKE '%xml%' and
  Question.Tags not LIKE '%jaxb%' and 
  Question.Tags not LIKE '%rx-java%' and
  Question.Tags not LIKE '%git%' and 
  Question.Tags not LIKE '%assembly%' and
  Question.Tags not LIKE '%hsqldb%' and 
  Question.Tags not LIKE '%jmh%' and
  Question.Tags not LIKE '%java-module%' and
  Question.Tags not LIKE '%module-info%' and
  Question.Tags not LIKE '%docker%' and
  Question.Tags not LIKE '%docker-compose%' and
  Question.Tags not LIKE '%C#%' and
  Question.Tags not LIKE '%development-environment%' and
  Question.Tags not LIKE '%mockito%' and
  Question.Tags not LIKE '%unit-testing%' and
  Question.Tags not LIKE '%objective-c%' and
  Question.Body LIKE '%<code>%' and 
  posttypeid = 1 
  --and datepart(year,creationdate) = 2008
  and question.creationdate BETWEEN @STARTDATE AND @ENDDATE
  and AcceptedAnswerId  is not null and Score > 0
  --and id = 18731465 
  and id not in (
  SELECT d.id
  FROM Posts d  -- d=duplicate
    LEFT JOIN PostHistory ph ON ph.PostId = d.Id
    LEFT JOIN PostLinks pl ON pl.PostId = d.Id
    LEFT JOIN Posts o ON o.Id = pl.RelatedPostId  -- o=original
  WHERE
    d.PostTypeId = 1  -- 1=Question
    AND pl.LinkTypeId = 3  -- 3=duplicate
    AND ph.PostHistoryTypeId = 10  -- 10=Post Closed
    and d.creationdate BETWEEN @STARTDATE AND @ENDDATE
  )
  order by Id asc
  

  
--21874 rows returned in 1275 ms (cached)

Enter Parameters

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