SELECT ( SELECT COUNT(1) FROM Posts q INNER JOIN PostTag...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Bicycles Meta

Q&A about the site for people who build and repair bicycles, people who train cycling, or commute on bicycles

-- Enter Query Title
-- Enter Query Description

SELECT
    (
        SELECT COUNT(1)
            FROM Posts q
            INNER JOIN PostTags pt ON pt.PostId = q.Id
            WHERE pt.TagId = (SELECT Id FROM Tags WHERE TagName = 'c#') AND (q.PostTypeId = 1)
    ) AS c1,
    (
        SELECT COUNT(1)
            FROM Posts q
            INNER JOIN PostTags pt ON pt.PostId = q.Id
            INNER JOIN Tags t ON t.Id = pt.TagId
            WHERE t.TagName = 'c#' AND q.PostTypeId = 1
    ) AS c2,
    (
        SELECT COUNT(1)
            FROM PostTags pt
            WHERE pt.TagId = (SELECT Id FROM Tags WHERE TagName = 'c#')
    ) AS c3,
    (
        SELECT t.Count
            FROM Tags t
            WHERE t.TagName = 'c#'
    ) AS c4

Enter Parameters

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