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 = POTMsgSet.id
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.
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 TranslationTemp lateItem ON TranslationTemp lateItem. potmsgset = POTMsgSet.id plate ON TranslationTemp lateItem. potemplate = SuggestivePOTem plate.potemplat e
JOIN SuggestivePOTem
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.