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
  sum(iif(comment like '%://%', 1, 0)) links,
  count(*) total
from
  (select distinct revisionguid, comment from posthistory) h
*/

/*
select
  *
from (
  select
    revisionguid, comment, count(*) n
  from
    posthistory
  group by
    revisionguid, comment
  having
    count(*) > 1) x
  inner join posthistory h on h.revisionguid = x.revisionguid
*/

select
  *
from (
  select
    x.revisionguid,
    (select count(*) from (select distinct comment from posthistory where revisionguid = x.revisionguid) y) dc
  from (
    select distinct
      revisionguid
    from
      posthistory) x
  ) x
  inner join posthistory h on h.revisionguid = x.revisionguid
where
  dc > 1

Enter Parameters

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