Posts by Type

0

Please login or register to vote for this query.

(click on this box to dismiss)

Drones and Model Aircraft

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

SELECT   Posts.PostTypeId        AS PostTypeId,
         Min(PostTypes.Name)     AS Name,
         Count(*)                AS Count,
         'site://posts/' + CAST(MIN(Posts.Id) as nvarchar) + '/revisions|' + CAST(MIN(Posts.CreationDate) as nvarchar)
                                 AS First,
         'site://posts/' + CAST(MAX(Posts.Id) as nvarchar) + '/revisions|' + CAST(MAX(Posts.CreationDate) as nvarchar)
                                 AS Last
FROM     Posts
         LEFT JOIN PostTypes
                ON Posts.PostTypeId = PostTypes.id
GROUP BY Posts.PostTypeId
ORDER BY Posts.PostTypeId

Enter Parameters

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