SELECT PostHistoryTypes.Id, MIN(PostHistoryTypes.Name) AS...

0

Please login or register to vote for this query.

(click on this box to dismiss)

スタック・オーバーフローMeta

プログラマーと熱狂的なプログラマーのためのサイトに関する質問と回答

SELECT
  PostHistoryTypes.Id,
  MIN(PostHistoryTypes.Name) AS Name,
  COUNT(CASE WHEN SUBSTRING(Text, 1, 2) = '{"' THEN 1 END) AS JsonCount,
  COUNT(*) AS AllCount
FROM PostHistory, PostHistoryTypes
WHERE
  PostHistory.Id % 100000 = 0
  AND
  PostHistory.PostHistoryTypeId = PostHistoryTypes.Id
GROUP BY PostHistoryTypes.Id
ORDER BY Id

Enter Parameters

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