SELECT Posts.Id, Title, count(Tags) FROM Posts INNER JOIN...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Emacs

Q&A for those using, extending or developing Emacs

-- For each question (i.e. posts where type = question), count the total 
-- number of tags – do this only for posts that have more than 5 tags associated 
-- with them. Display 10 random posts with the highest number of tags.
SELECT 
  Posts.Id,
  Title,
  count(Tags)
FROM Posts INNER JOIN PostTypes
    ON (Posts.Id = PostTypes.Id)
WHERE PostTypes.Name = 'Question'
GROUP BY Posts.Id, Title
--ORDER BY  DESC;

Enter Parameters

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