Most common tags with short, long, or missing excerpt or wiki

3

Please login or register to vote for this query.

(click on this box to dismiss)

Lists the most commonly used tags with empty/missing/short tag wikis (wiki or excerpt). Can also identify tag wikis that are over a specified length. Enter -1 for all parameters to match all tags. Tags that have been synonymized are excluded.

Drones and Model Aircraft Meta

Q&A for experienced flyers, pilots, and builders of drones and model aircraft

-- MaxBodyLength: Body shorter than "Set to -1 to disable"
DECLARE @max_body_len INT = ##MaxBodyLength:INT?100##;
-- MaxExcerptLength: Excerpt shorter than "Set to -1 to disable"
DECLARE @max_excerpt_len INT = ##MaxExcerptLength:INT?40##;
-- MinBodyLength: Body longer than "Set to -1 to disable"
DECLARE @min_body_len INT = ##MinBodyLength:INT?11000##;
-- MinExcerptLength: Excerpt longer than "Set to -1 to disable"
DECLARE @min_excerpt_len INT = ##MinExcerptLength:INT?-1##;

SELECT Count,
       t.TagName,
       LEN(pe.Body)  AS [Excerpt length],
       LEN(pw.Body)  AS [Wiki length],
       ExcerptPostId AS [Post Link]
FROM   Tags t
       LEFT JOIN Posts pe ON pe.Id = t.ExcerptPostId
       LEFT JOIN Posts pw ON pw.Id = t.WikiPostId
WHERE  (WikiPostId IS NULL                              -- no wiki/excerpt
        AND (@max_excerpt_len <> -1 OR @max_body_len <> -1))
       OR LEN(pe.Body) < nullif(@max_excerpt_len,-1) -- short excerpt
       OR LEN(pw.Body) < nullif(@max_body_len,-1)    -- short wiki
       OR LEN(pe.Body) > nullif(@min_excerpt_len,-1) -- long excerpt
       OR LEN(pw.Body) > nullif(@min_body_len,-1)    -- long wiki
ORDER  BY Count DESC, len(pw.Body)+len(pe.body) desc, t.TagName

Enter Parameters

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