Comment 8 for bug 734642

Do note that the original version returned 200 rows, while the final one you have returns 27 (and innermost distinct shouldn't change that, since that was for potmsgset in (...)).

Also, your "pots" query seems to contain unused JOINs:

  JOIN TranslationTemplateItem ON TranslationTemplateItem.potmsgset =
          JOIN SuggestivePOTemplate ON TranslationTemplateItem.potemplate = SuggestivePOTemplate.potemplate

I haven't looked closely otherwise, but unless Gary has added WITH support to Storm in the last week (he did say he wanted to :), then tough luck with that too.