P Apps

0

Please login or register to vote for this query.

(click on this box to dismiss)

Mythology Meta

Q&A about the site for enthusiasts and scholars of mythology and folklore

DECLARE @total float
SELECT @total = Sum(Cast(ViewCount as bigint)) FROM Posts WHERE PostTypeId = 1

SELECT 
    Tags.Tagname AS Tag, 
    Count(*) AS Questions, 
    Sum(Cast(Posts.ViewCount as bigint)) AS Views,
    str(100 * Sum(Cast(Posts.ViewCount as bigint)) / @total,6,2) AS percentOfSite,
    Sum(Posts.Score) AS Score,
    Sum(Posts.AnswerCount) AS Answers,
    Sum(Cast(Posts.ViewCount as bigint)) / Count(*) AS AvgViews,
    str(Sum(Posts.Score) / Cast(Count(*) AS Float),6,2) AS AvgScore,
    str(Sum(Posts.AnswerCount) / Cast(Count(*) AS Float),6,2) AS AvgAnswers
  FROM Posts 
  JOIN PostTags ON Posts.Id = PostTags.PostId
  JOIN Tags ON PostTags.TagId = Tags.Id
  WHERE Posts.PostTypeId = 1 AND
  (Tags.Tagname IN 
  ('square', 'square-connect','square-checkout','clover-payment',
  'stripe-payment','stripe-connect','stripe.net','stripe.js','stripe-checkout',
  'react-stripe-elements','stripe-subscriptions','stripe-api','stripe-payout',
  'stripe-invoices','stripe-elements','swipestripe','stripe-cli','stripe-sca',
  'react-native-stripe-api', 'stripe-terminal','shopify','shopify-api','shopify-app',
  'shopify-template','shopify-api-node','shopify-activemerchant',
  'shopify-javascript-buy-sdk'))
  AND Posts.CreationDate > '2016-02-01'
  GROUP BY Tags.Tagname

Enter Parameters

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