Pandas normal and duplicate questions

0

Please login or register to vote for this query.

(click on this box to dismiss)

Motor Vehicle Maintenance and Repair Meta

Q&A about the site for mechanics and DIY enthusiast owners of cars, trucks, and motorcycles

WITH duplicate_questions AS (
  SELECT TOP 2000
   p.Id AS DuplicatePostId,
   RevisionGUID,
   DeletionDate,
   PostTypeId,
   Score,
   ViewCount,
   Body,
   Title,
   Tags,
   u.Id AS DuplicateUserId,
   Reputation,
   Comment
   --TRIM('[]' FROM
    --  JSON_QUERY(Text, '$.OriginalQuestionIds')
   -- ) AS OriginalId
  FROM
    Posts p JOIN Users u
      ON u.Id = p.OwnerUserId
  JOIN
    PostHistory PH
      ON PH.PostId = p.Id
  WHERE
     p.tags LIKE '%python-3.x%'
     AND p.tags LIKE '%pandas%'
     AND p.CreationDate >= '2015-01-01'
     AND Comment = '101' -- Duplicate
),
normal_questions AS (
  SELECT TOP 2000
   p.Id AS NormalPostId,
   RevisionGUID,
   DeletionDate,
   PostTypeId,
   Score,
   ViewCount,
   Body,
   Title,
   Tags,
   u.Id AS NormalUserId,
   Reputation,
   Comment
   --null AS OriginalId
  FROM
    Posts p JOIN Users u
      ON u.Id = p.OwnerUserId
  JOIN
    PostHistory PH
      ON PH.PostId = p.Id
  WHERE
     p.tags LIKE '%python-3.x%'
     AND p.tags LIKE '%pandas%'
     AND p.CreationDate >= '2015-01-01'
     AND Comment != '101' -- Not Duplicate
)
SELECT * FROM normal_questions
UNION 
SELECT * FROM duplicate_questions

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results