Average question score of tag combinations

0

Please login or register to vote for this query.

(click on this box to dismiss)

Science Fiction and Fantasy

Q&A for science fiction and fantasy enthusiasts

DECLARE @Tag1 VARCHAR(25) = ##Tag1:string##
DECLARE @Tag2 VARCHAR(25) = ##Tag2:string##

SELECT avg(cast(Score AS FLOAT)) AS [Score] FROM Posts WHERE 
  PostTypeId = 1 AND 
  Tags LIKE @Tag1 AND 
  Tags LIKE @Tag2
GROUP BY Id

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results