Oracle Analytics Cloud and Server

Products Banner

FILTER Expression

Received Response
31
Views
1
Comments

Summary

I am trying to do 2 Rpts. Count and SUM based on a value

Content

I am trying to create two reports. 

Show SUM(XPaidAmt) where XPaidAmt <= 10.00

Show Count(XPaidAmt) where XPaidAmt <= 10.00

Both grouped by XPayDesc

Sum( X_PAID_AMT = {"<=10.00"}>} X_PAID_AMT)

Count( X_PAID_AMT = {"<=10.00"}>} X_PAID_AMT)

Suggestions?

 

Version

18 , Cloud

Answers

  • Brian666H
    Brian666H ✭✭✭✭✭

    SELECT    
        SUM(x_paid_amt) S
        ,COUNT(x_paid_amt)C
        ,x_pymnt_handling_desc    
    FROM
        fact_vchr_payment_type
        WHERE x_business_unit = '80801'
        AND P_BANK_ACCT_KEY = 'RFND'
        AND x_paid_amt <= 10.00
        GROUP BY x_pymnt_handling_desc
        ORDER BY 
        COUNT(x_paid_amt)
        ,SUM(x_paid_amt)