Q&A about the site for students, teachers, and linguists wanting to discuss the finer points of the Italian language
SELECT PostTypeId, RepCategory, count(*) AS NumPosts, count(CASE WHEN (LEN(Tags) > 0) AND (LEN(Text) IS NULL) AND (LEN(Title) IS NULL) THEN 1 ELSE NULL END) AS TagOnlyEdits, count(CASE WHEN (LEN(Tags) IS NULL) AND (LEN(Text) > 0) AND (LEN(Title) IS NULL) THEN 1 ELSE NULL END) AS TextOnlyEdits, count(CASE WHEN (LEN(Tags) IS NULL) AND (LEN(Text) IS NULL) AND (LEN(Title) > 0) THEN 1 ELSE NULL END) AS TitleOnlyEdits, count(CASE WHEN (LEN(Tags) > 0) AND (LEN(Text) > 0) AND (LEN(Title) IS NULL) THEN 1 ELSE NULL END) AS TagTitleEdits, count(CASE WHEN (LEN(Tags) > 0) AND (LEN(Text) IS NULL) AND (LEN(Title) > 0) THEN 1 ELSE NULL END) AS TagTextEdits, count(CASE WHEN (LEN(Tags) IS NULL) AND (LEN(Text) > 0) AND (LEN(Title) > 0) THEN 1 ELSE NULL END) AS TitleTextEdits, count(CASE WHEN (LEN(Tags) > 0) AND (LEN(Text) > 0) AND (LEN(Title) > 0) THEN 1 ELSE NULL END) AS TagTextTitleEdits FROM ( SELECT p.PostTypeId, se.Tags, se.Text, se.Title, CASE WHEN u.Reputation BETWEEN 0 AND 199 THEN 'NewUser' WHEN u.Reputation BETWEEN 200 AND 999 THEN 'LowerRepUser' ELSE 'HigherRepUser' END as RepCategory FROM SuggestedEdits se LEFT JOIN Posts p ON p.Id = se.PostId LEFT JOIN Users u ON u.Id = se.OwnerUserId WHERE se.RejectionDate is NULL AND se.ApprovalDate is NULL ) as DT1 GROUP BY DT1.PostTypeId, DT1.RepCategory ORDER BY RepCategory