5 Replies Latest reply: Feb 19, 2016 2:20 PM by Sunny Talwar RSS

    Can I qualify a table in count expression?

      Hi Folks


      I have two tables, one is "master" table and the other is "detail" table. I need to count the rows in the detail table considering the selected value in the master table. For example: I need to count the number of complains of a customer, the master table is the customer table, and the complains table is the detail table, both tables have an CUSTOMER_ID field.


      I need to count records from detail table like this: count(DISTINCT CUSTOMER_ID). But I got incorrect results.


      Thanks in advance.