Here's an example of the SQL generated by Joomla's Query Class, note the lack of spaces:

```sql
SELECT `a`.`id`,`a`.`catalog_type_id`,`a`.`name`,`a`.`path`,`a`.`description`,`a`.`customfields`,`a`.`parameters`,`a`.`metadata`,`catalog`.`catalog_type_id` as `catalog_catalog_type_id`,`catalog`.`source_id` as `catalog_source_id`,`catalog`.`sef_request` as `catalog_sef_request`,`catalog`.`view_group_id` as `catalog_view_group_id`,`catalog`.`redirect_to_id` as `catalog_redirect_to_id` FROM `#__applications` as `a`,`#__catalog` as `catalog` WHERE `catalog`.`application_id`=1 AND `catalog`.`application_id`=`a`.`id` AND `catalog`.`source_id`=`a`.`id` AND `catalog`.`catalog_type_id`=`a`.`catalog_type_id`
```

I really don't see the need to change it. It's not incorrect. The query will work fine. And, the Query tool itself generates SQL like that. =). 

My point was there is no data integrity on the Contact entity as it relates to Banners. 

If unpublished contacts are not displayed in this listbox -- and a banner is edited that is associated w an unpublished contact -- that link to the contact will automatically, and without any warning, be removed from the banner when saved. 

That's not intended, mind you, but it will be the result. Questions could come "Why did my link to this Contact go away when I edited the banner?" The answer, of course being, because the contact isn't published. While that might make sense, it does seem like an odd way to remove links to unpublished contacts. Meanwhile, those banners that do not get edited will retain the link. =)

Does it matter? Well, I don't know, maybe, maybe not. Just thought I'd point out what will happen. 

But, the SQL itself is fine and looks a lot like what the Joomla Query class produces routinely.