Sunday, December 23, 2012

OBIEE 11g: SQL Conditional COUNT & SUM

To apply condition in COUNT and SUM aggregations, use below methods:

FILTER(COUNT(Column1) USING(Column2 = ‘ABC’))

FILTER(SUM(Column1) USING(Column2 > 0))

2 comments:

  1. I am not a programmer but I have this SQL subject this session and have to prepare for it. What all topics should be covered in it?
    And has anyone studied from this course www.wiziq.com/course/125-comprehensive-introduction-to-sql of SQL tutorial online?? or tell me any other guidance...
    would really appreciate help

    ReplyDelete
  2. Hi Chris,
    As a side note, OBIEE has slightly different SQL syntaxing than Oracle SQL, which most databases use - but as you know the logic is still the same. I also recommend w3Schools - http://www.w3schools.com/sql/default.asp.
    Another important difference is are you looking for DDL or DML?

    ReplyDelete

Note: Only a member of this blog may post a comment.