revision comments with links

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

select
  count(iif(comment like '%://%', revisionguid, null)) links,
  count(*) revisions
from (
  select distinct 
    revisionguid,
    comment 
  from 
    posthistory 
  where
    posthistorytypeid in (4,5,6)
  ) h


select
  l.*,
  t.name
from (
  select
    posthistorytypeid,
    count(*) links
  from
    posthistory
  where
    comment like '%://%'
  group by
    posthistorytypeid) l
  inner join posthistorytypes t on t.id = l.posthistorytypeid
order by
  l.posthistorytypeid

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results