SELECT p.Id, p.Title, tt.Count as TagsCount FROM Posts AS p

0

Please login or register to vote for this query.

(click on this box to dismiss)

Space Exploration

Q&A for spacecraft operators, scientists, engineers, and enthusiasts

SELECT p.Id, p.Title, tt.Count as TagsCount
FROM Posts AS p
LEFT JOIN (SELECT st.PostId, st.TagId, t.Id, t.Count
           FROM PostTags AS st 
           LEFT Join Tags AS t ON st.TagId = t.Id
           WHERE t.Count = 5) AS tt
           ON p.Id = tt.PostId
LEFT JOIN (SELECT Name, Id FROM PostTypes WHERE Name ='question') AS pt 
           ON p.Id = pt.Id
           ORDER BY NEWID()       
OFFSET 0 ROWS FETCH FIRST 10 ROWS ONLY

Enter Parameters

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