/* SELECT TOP 50 pt.PostId AS [Post Link] FROM PostTags pt

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 TOP 50 pt.PostId AS [Post Link]
    FROM PostTags pt
    WHERE NOT EXISTS (SELECT Id FROM Posts p WHERE p.Id = pt.PostId)
    GROUP BY pt.PostId*/

/*        SELECT pt.PostId
            FROM PostTags pt
            WHERE pt.TagId = (SELECT Id FROM Tags WHERE TagName = 'c#')

EXCEPT
        SELECT q.Id
            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
*/

/*
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