Component Library/Design System Totals

0

Please login or register to vote for this query.

(click on this box to dismiss)

Totals the amount of posts, answers, comments and accepted answers and percentage of posts that have accepted answers.

Stack Overflow

Q&A for professional and enthusiast programmers

SELECT 
CASE
  WHEN Tags LIKE '%material-ui%' THEN 'Mui'
  WHEN Tags LIKE '%fluent-ui%' THEN 'Fluent'
  WHEN Tags LIKE '%fluent-react%' THEN 'Fluent'
  WHEN Tags LIKE '%mantine%' THEN 'Mantine'
  WHEN Tags LIKE '%chakra-ui%' THEN 'Chakra'
  WHEN Tags LIKE '%antd%' THEN 'Ant'
END AS 'Design System',
COUNT(distinct Posts.Id) AS NumPosts,
SUM(AnswerCount) AS AnswerCount, 
COUNT(distinct AcceptedAnswerId) AS AcceptedAnswersCount,
(CAST(COUNT(distinct AcceptedAnswerId) AS FLOAT) / CAST(COUNT(distinct Posts.Id) AS FLOAT)) AS PostsWithAcceptedPercent,
SUM(CommentCount) AS CommentCount
  FROM Posts
  LEFT JOIN
    PostTypes
      on Posts.PostTypeId=PostTypes.Id
  WHERE Title <> ''
  AND CreationDate >= ##From:string?2018-01-01##
  AND Tags LIKE '%reactjs%'
  AND (
    Tags LIKE '%material-ui%' OR
    Tags LIKE '%fluent-ui%' OR
    Tags LIKE '%fluent-react%' OR
    Tags LIKE '%mantine%' OR
    Tags LIKE '%chakra-ui%' OR
    Tags LIKE '%antd%'
  )
  GROUP BY 
    CASE
      WHEN Tags LIKE '%material-ui%' THEN 'Mui'
      WHEN Tags LIKE '%fluent-ui%' THEN 'Fluent'
      WHEN Tags LIKE '%fluent-react%' THEN 'Fluent'
      WHEN Tags LIKE '%mantine%' THEN 'Mantine'
      WHEN Tags LIKE '%chakra-ui%' THEN 'Chakra'
      WHEN Tags LIKE '%antd%' THEN 'Ant'
    END
  ORDER BY 
    CASE
      WHEN Tags LIKE '%material-ui%' THEN 'Mui'
      WHEN Tags LIKE '%fluent-ui%' THEN 'Fluent'
      WHEN Tags LIKE '%fluent-react%' THEN 'Fluent'
      WHEN Tags LIKE '%mantine%' THEN 'Mantine'
      WHEN Tags LIKE '%chakra-ui%' THEN 'Chakra'
      WHEN Tags LIKE '%antd%' THEN 'Ant'
    END
;

Enter Parameters

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