SELECT sum(case when Title LIKE '% -- %' then 1 else 0 en...

1

Please login or register to vote for this query.

(click on this box to dismiss)

Craft CMS Meta

Q&A about the site for administrators, end users, developers and designers for Craft CMS

SELECT
    sum(case when Title LIKE '% -- %' then 1 else 0 end) AS [mdash],
    sum(case when Title LIKE '% <!-- %' then 1 else 0 end) AS [comment],
    sum(case when Title LIKE '%[a-z0-9]-- %' then 1 else 0 end) AS [decrement],
    sum(case when Title LIKE '% --[a-z0-9]%' then 1 else 0 end) AS [increment],
    sum(case when (Title LIKE '%-- %' OR Title LIKE '%--- %')
              and Title NOT LIKE '% -- %'
              and Title NOT LIKE '% <!-- %'
              and Title NOT LIKE '%[a-z0-9]-- %'
              and Title NOT LIKE '% --[a-z0-9]%' then 1 else 0 end) AS [rest]
FROM Posts

Enter Parameters

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