Query : Suppliers

Tables used:
POZ_SUPPLIERS
POZ_SUPPLIERS_V
HZ_PARTIES

select ps.taxpayer_country, psv.segment1, psv.vendor_name, psv.vendor_id, hp.party_id, psv.enabled_flag, psv.type_1099, psv.withholding_status_lookup_code, psv.withholding_start_date, psv.business_relationship, psv.vendor_type_lookup_code, ps.creation_source

from poz_suppliers ps,
poz_suppliers_v psv,
hz_parties hp

where hp.party_id = ps.party_id
and hp.party_id = psv.party_id


--count by supplier type (enabled only)
select count(psv.vendor_type_lookup_code), psv.vendor_type_lookup_code
from poz_suppliers ps,
poz_suppliers_v psv,
hz_parties hp
where hp.party_id = ps.party_id
and hp.party_id = psv.party_id
and ps.enabled_flag = 'Y'
group by psv.vendor_type_lookup_code


Comments