Uploaded image for project: 'Phoenix'
  1. Phoenix
  2. PHOENIX-2062

Support COUNT DISTINCT with multiple arguments

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:

      Description

      I have a situation where I want to count the distinct combination of a couple of columns.

      When I try the following:-

      select count(distinct a.col1, b.col2)
      from table tab1 a
      inner join tab2 b on b.joincol = a.joincol
      where a.col3 = ‘some condition’
      and b.col4 = ‘some other condition';

      I get the following error:-

      Error: ERROR 605 (42P00): Syntax error. Unknown function: "DISTINCT_COUNT". (state=42P00,code=605)

        Activity

        Hide
        pranavanc5e Pranavan added a comment -

        Hi!!

        I am Pranavan from University of Moratuwa, Sri Lanka. I am interswted in doing this project. Can someone give further input in this issue?

        Show
        pranavanc5e Pranavan added a comment - Hi!! I am Pranavan from University of Moratuwa, Sri Lanka. I am interswted in doing this project. Can someone give further input in this issue?
        Hide
        ram_krish ramkrishna.s.vasudevan added a comment -

        So currently we don't do COUNT DISTINCT on a combination of columns. The logic to find the unique elements are done only for the single column?

        Show
        ram_krish ramkrishna.s.vasudevan added a comment - So currently we don't do COUNT DISTINCT on a combination of columns. The logic to find the unique elements are done only for the single column?

          People

          • Assignee:
            RCheungIT Haoran Zhang
            Reporter:
            jamestaylor James Taylor
          • Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:

              Development