SELECT
sum(((nvl(zl.taxable_amt,0) *nvl(zl.tax_rate,0))/100) )tax_amount
FROM zx_lines zl,
po_line_locations_all pll,
po_lines_all pl,
po_headers_all ph
WHERE zl.trx_id = pll.po_header_id
AND zl.trx_line_id = pll.line_location_id
AND zl.entity_code = 'PURCHASE_ORDER'
AND pl.po_header_id = pll.po_header_id
AND pl.po_line_id = pll.po_line_id
AND pl.po_header_id = ph.po_header_id
AND ph.po_header_id = 300000003243945 --po_headers_all.po_header_id
order by pl.po_line_id