Titles

0

Please login or register to vote for this query.

(click on this box to dismiss)

Lifehacks

Q&A for people looking to bypass life's everyday problems with simple tricks

SELECT Id, TagName 
FROM Tags
ORDER BY ID

SELECT *
FROM PostTags

SELECT Id, Score, Tags
FROM Posts 
ORDER BY Score Desc

Select TagId, TagName, AvgScore, CountTags
FROM(
  SELECT TagId, AVG(Score) AS AvgScore, Count(TagId) AS CountTags
  FROM Posts
  JOIN PostTags ON Posts.Id=PostTags.PostId
  GROUP BY TagId) AS Inter JOIN Tags ON INTER.TagId=Tags.ID
  
 
SELECT TagId, AVG(Score)
FROM((
  SELECT TagId, PostId
  FROM PostTags JOIN Tags ON PostTags.TagId = Tags.Id
  WHERE Count >= 5
  ) AS TagTable JOIN Posts ON TagTable.PostId = Posts.Id)
GROUP BY TagId

Enter Parameters

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