I was asked to build a group that showed all Accounts that had been converted to Leads and had NOT been assigned a Leadsource. In the customer's system they had created two custom fields- Lead.QualifiedBy which populated Account.QualifiedBy during the Lead conversion process.
Add in the following conditions under Accounts to build the group-
does contain data
(select contactid from contact_leadsource)
This creates the following SQL syntax:
SELECT [list of fields in group's layout] WHERE (A1.QUALIFIEDBY IS NOT NULL AND A1.QUALIFIEDBY <> '') AND (A3.CONTACTID IN (select contactid from contact_leadsource)) ORDER BY A1.ACCOUNT_UC ASC