WITH Pleas AS ( SELECT PostId, CreationDate FROM Comments...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Internet of Things Meta

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

WITH Pleas AS (
  SELECT
    PostId,
    CreationDate
  FROM
    Comments
  WHERE
    Text LIKE '%why%down vote%?%' OR Text LIKE '%why%downvote%?%'
),
Counts AS (
  SELECT
    COUNT(DISTINCT PostId) AS 'Count'
  FROM
    Pleas
)

SELECT
  (SELECT Counts.Count FROM Counts) As 'Pleas',
  COUNT(DISTINCT q.PostId) AS 'Pleas Answered'
FROM
  Pleas AS q
JOIN
  Comments AS a
ON
  q.PostId = a.PostId
WHERE
  q.CreationDate < a.CreationDate

Enter Parameters

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