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

2

Please login or register to vote for this query.

(click on this box to dismiss)

Tags which that have singular and plural version (with s-plural). For example [database] and [database].

Stack Overflow

Q&A for programmers

-- Most common tags with singular and plural version (s-plur
-- Tags which that have singular and plural version (with s-plural).
-- For example [database] and [database].


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 + 's' = 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