Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.
SELECT pa.segment1 proj, pa.name proj_name , pa.project_type proj_type, max(pdi.invoice_date) inv_dt, (pap.last_name || ' ' || pap.first_name) people_name ,pag.agreement_num agg_num, pag.agreement_type agg_type,ra.customer_number cust_num,ra.customer_name cust_name FROM pa_projects_all pa, pa_draft_invoices_all pdi, per_all_people_f pap, pa_agreements_all pag, ra_customers ra WHERE pa.project_status_code = 'ACTIVE' AND pa.project_type NOT IN ('B\&P GOVERNMENT', 'CAPITAL', 'EAC', 'ASSESSED', 'UNBURDENED' ,'B\&P COMMERCIAL', 'B\&P CPFF COMMERCIAL') AND pdi.project_id = pa.project_id AND pdi.released_by_person_id = pap.person_id and ra.customer_id=pag.customer_id and (exists (select project_id from pa_expenditure_items_all where project_id = pa.project_id) or exists (select project_id FROM pa_events where project_id = pa.project_id)) group by pa.segment1, pa.name, pa.project_type,pdi.invoice_date, pap.last_name,pap.first_name,pag.agreement_num,pag.agreement_num, pag.agreement_type ,ra.customer_number,ra.customer_name;
Join the community of 500,000 technology professionals and ask your questions.