Figured this out. DBlank you were right there are weird rules for this application. Apparently the dynamic message group sql columns HAVE to be three in number, and the columns HAVE to be in the order of listing_id, messaging_id, name. I don't know why... We think it must just be in the order the columns exist in the (listing) table.
It also:
has to end with "messaging_id is not null" can't end with a semi-colon (which is a pl/sql standard, but the form is driving these queries);
and extra things at the end, like "order by l.messaging_id", isn't part of the form's built-in sql (hopefully it's already built in to it, so the end user doesn't have to specify it).
Here is the code that works!
select l.listing_id, l.messaging_id, l.name
from listing l, org o
where l.org_seqnum = o.org_seqnum
and o.org_code like '060%'
and l.messaging_id is not null
Thank you for looking into this!