Posts containing images, sorted by the number of images.
Q&A for professional and enthusiast programmers
select Id as [Post Link], len(Body) - len(replace(Body, '<img ', '<img')) as [Images], Body as [Body] from Posts where Body like '%<img %' order by Images desc