SELECT q.Id AS QID, qh.PostHistoryTypeId, qh.Text AS QIni...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Beer, Wine & Spirits Meta Stack Exchange

Q&A for alcoholic beverage aficionados and those interested in beer, wine, or spirits

SELECT 
	q.Id AS QID,
	qh.PostHistoryTypeId,
	qh.Text AS QInitialTags,
	COUNT(qh.PostId)
FROM
	Posts q
	LEFT JOIN
	Posts a
	ON (q.Id = a.ParentId)
	LEFT JOIN
	PostHistory qh
	ON (q.Id = qh.PostId)
WHERE
	q.PostTypeId = 1 AND
	q.ClosedDate IS NULL AND
    (a.Id IS NULL OR q.OwnerUserId <> a.OwnerUserId) AND
	q.CreationDate >= '2017-09-24 00:00:00.0' AND
    q.CreationDate < '2017-10-01 00:00:00.0' AND
	qh.PostHistoryTypeId = 3
GROUP BY
	q.Id,
	qh.PostHistoryTypeId,
	qh.Text
ORDER BY
	q.Id

Enter Parameters

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