SQL Language (MOSC)

MOSC Banner

two aggregate function query in a single query

edited Apr 24, 2025 2:16PM in SQL Language (MOSC) 8 commentsAnswered

hello,

how to use two aggregate function query in a single query?

SELECT abs(SUM(mmt.PRIMARY_QUANTITY*actual_cost)) Issued_value
FROM mtl_material_transactions mmt,
apps.org_organization_definitions ood
WHERE mmt.organization_id=ood.organization_id
AND mmt.organization_id IN ('301','303','304')
AND mmt.transaction_type_id NOT IN (36,51,52,53,71,2)
AND trunc(mmt.transaction_date) between nvl(trunc(to_date(:P_DT_FM,'YYYY/MM/DD HH24:MI:SS')),trunc(mmt.transaction_date)) and nvl(trunc(to_date(:P_DT_TO,'YYYY/MM/DD HH24:MI:SS')),trunc(mmt.transaction_date))
AND mmt.transaction_quantity<0 --- 4310158.45960973

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center