11 slide

0

Please login or register to vote for this query.

(click on this box to dismiss)

Board and Card Games

Q&A for people who like playing board games, designing board games or modifying the rules of existing board games

SELECT TOP 10
   Tag.TagName
   ,CONCAT(YEAR(Pos.CreationDate),RIGHT(CONCAT(0,MONTH(Pos.CreationDate)),2)) as Periods
   ,COUNT(1) as Skaits
   ,COUNT(DISTINCT Usr.Id) as Unique_Users
FROM Users as Usr
  INNER JOIN Posts as Pos ON Usr.Id=Pos.OwnerUserId
  INNER JOIN PostTags as PosTg ON Pos.Id=PosTg.PostId
  INNER JOIN Tags as Tag ON PosTg.TagId=Tag.Id
WHERE
  UPPER(Usr.DisplayName) LIKE 'ANDR%'
  AND UPPER(Tag.TagName)='CSS'
  AND Usr.CreationDate BETWEEN '2019/01/01 00:00:00' AND '2019/12/31 23:59:59'
  GROUP BY Tag.TagName
  , CONCAT(YEAR(Pos.CreationDate),RIGHT(CONCAT(0,MONTH(Pos.CreationDate)),2))
ORDER BY Periods ASC;




/*SELECT Count(ID) as Skaits
FROM Users
WHERE UPPER(DisplayName) LIKE 'ANDR%'*/



/*SELECT Count(ID) as Skaits
FROM Posts
WHERE CreationDate BETWEEN '2019/01/01 00:00:00' AND '2019/12/31 23:59:59'*/


/*SELECT DISTINCT TagID, TagName
from PostTags
INNER JOIN Tags
ON PostTags.TagID=Tags.ID
ORDER BY TagID*/

Enter Parameters

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