Most common tags with singular and plural version (es-plural)

1

Please login or register to vote for this query.

(click on this box to dismiss)

Tags which that have singular and plural version (with es-plural). For example [hash] and [hashes].

Stack Overflow

Q&A for programmers

-- Most common tags with singular and plural version (es-plural)
-- Tags which that have singular and plural version (with es-plural). 
-- For example [hash] and [hashes].

select 

( select count(*) AS cnts
  from posttags pts
  where pts.TagId = t1.id) + 
( select count(*) AS cnts
  from posttags pts
  where pts.TagId = t2.id)
as [Total count],

t1.TagName [Singular name],

( select count(*) AS cnts
  from posttags pts
  where pts.TagId = t1.id) as [Singular count],

t2.TagName [Plural tag],

( select count(*) AS cntp
  from posttags ptp
  where ptp.TagId = t2.id) as [Plural count]

from Tags t1
join Tags t2 on ( t1.TagName + 'es' = t2.TagName)
order by [Total count] desc

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results
:records returned in :time ms:cached