Here is another SEDE query.
I take a slightly different approach. Instead of searching in the html (that is found in the Posts.body field) I use the actual markdown as source. This is more complicated (and performs worse) because the PostHistory table contains all revisions of a post, not only the latest one. So I do some juggling to find the last revision. In that text I use the same technique Glorfindel used: a Like statement but I look for the
![ ][ ] markdown. Instead of length of the text I added a rough estimate of the word count.
To keep SEDE happy I do a TOP 1000.
select top 1000
a.id as [Post Link]
, len(text)-len(replace(text,' ','')) [~ word count]
from posts a
inner join posts q on q.id = a.parentid
inner join (
from posthistory phi
where id = (select max(id)
from posthistory ph
where ph.postid = phi.postid
and ph.posthistorytypeid in (2,5,8))
) md on md.postid = a.id
where a.posttypeid = 2 -- answers
md.text like '%![%][%]%'
--md.text like '%![%](%)%' or
--md.text like '%<img src="%"%'
order by 4 desc
This is what the result looks like:
Keep in mind SEDE is updated once a week on Sunday.
Use the fine SEDE Tutorial written by the admirable Monica Cellio.
Say "Hi" in SEDE chat.