sql error: Unknown column 'redbcalgary.rets_property_listing.Matrix_Unique_ID' in 'on clause'
SELECT *,'2' FROM (SELECT * FROM redbcalgary.rets_property_listing INNER JOIN redbcalgary.creb_openhouse ON redbcalgary.rets_property_listing.Matrix_Unique_ID = redbcalgary.creb_openhouse.Listing_MUI WHERE Community='elboya' AND City='calgary' AND IBGTable<>'cal' ORDER BY IBGTimeAdded DESC, ListPrice ASC LIMIT 0,20) a UNION ALL SELECT *,'2' FROM (SELECT * FROM redbcalgary.excl_property_listing INNER JOIN redbcalgary.creb_openhouse ON redbcalgary.rets_property_listing.Matrix_Unique_ID = redbcalgary.creb_openhouse.Listing_MUI WHERE Community='elboya' AND City='calgary' AND IBGTable<>'cal' and ListAgentMLSID in ('CPETERJO2') ORDER BY IBGTimeAdded DESC, ListPrice ASC LIMIT 0,20) b