That seems to be rather complicated query (at least to me - but I only know basics of SQL).
That query shows also 500 rep points for Brian M. Scott earned only with upvotes and accepts (no bounties). That is pretty impressive, too. I am glad that he returned to the site.