SELECT E.Extension, COUNT(*) AS [Count] FROM ( SELECT TOP...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Music Fans Meta

Q&A about the site for music historians, critics, and fans

SELECT
  E.Extension,
  COUNT(*) AS [Count]
FROM (
SELECT TOP 50000
  SUBSTRING(
    P.Body COLLATE Latin1_General_BIN,
    PATINDEX('%stack.imgur.com/%', P.Body COLLATE Latin1_General_BIN)+22,
    3
  ) AS Extension
FROM Posts P
WHERE
  PATINDEX('%stack.imgur.com/%', P.Body COLLATE Latin1_General_BIN) > 0
) E
GROUP BY E.Extension

Enter Parameters

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