SELECT c.site_use_id,
a.cust_account_id,
e.address1,
e.address2,
e.address3,
e.address4,
e.postal_code,
e.province,
e.state,
country
FROM hz_cust_accounts a,
hz_cust_acct_sites_all b,
hz_cust_site_uses_all c,
hz_party_sites d,
hz_locations e
WHERE a.cust_account_id = b.cust_account_id
AND b.cust_acct_site_id = c.cust_acct_site_id
AND b.party_site_id = d.party_site_id
AND d.location_id = e.location_id
AND c.site_use_code = 'BILL_TO'
AND c.status = 'A'
AND b.org_id = c.org_id
AND b.org_id = 160
AND a.cust_account_id IN (595595, 555158)
a.cust_account_id,
e.address1,
e.address2,
e.address3,
e.address4,
e.postal_code,
e.province,
e.state,
country
FROM hz_cust_accounts a,
hz_cust_acct_sites_all b,
hz_cust_site_uses_all c,
hz_party_sites d,
hz_locations e
WHERE a.cust_account_id = b.cust_account_id
AND b.cust_acct_site_id = c.cust_acct_site_id
AND b.party_site_id = d.party_site_id
AND d.location_id = e.location_id
AND c.site_use_code = 'BILL_TO'
AND c.status = 'A'
AND b.org_id = c.org_id
AND b.org_id = 160
AND a.cust_account_id IN (595595, 555158)