select ws.websiteid, ws.portal_name, dom.domainName, dom.baseURL, ws.portal_theme from fsenablers..tbl_cus_websites ws inner join fsenablers..tbl_cus_customers cus on ws.customerid = cus.customerid inner join fsenablers..tbl_CUS_WebsiteDomains dom on dom.websiteid = ws.websiteid where cus.fsl_companyid = and cus.fsl_tablecode = and nullif( auth_clntcd, '' ) is not null and nullif( portal_name, '' ) is not null and profile_dspOnMgdAccessList = 1 order by cus.name select skuid, sku, skuDesc from tbl_prd_skus where ownerid = and fsl_tablecode = 'mfr' and sku = select count(*) itmCount from tbl_trk_memberactivity where fspro_userid = and eventcd = 'EML' and eventdetail =