Uploaded image for project: 'Search and Discovery'
  1. Search and Discovery
  2. SEARCH-2250

Support count(distinct field_name) with group by

    Details

    • Type: Story
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None

      Description

      When verifying SEARCH-900 and testing count(distinct) the following error was produced: 

      java.sql.SQLException: java.sql.SQLException: java.io.IOException: 04110039 Unable to execute the query, error caused by: null

      An example query: 

      select count(distinct cm_name) as `Expense Name`, finance_amount, finance_location, finance_title
      from alfresco
      group by finance_amount, finance_location, finance_title

      This query is a valid SQL query that should work and should get you the number of distinct 'cm_name' values within each group.

      normal count(cm_name) within a group, will count how many rows in that group have a value and the count distinct(cm_name) within a group, will count the different values available in the rows group. 

      Acceptance criteria:

      • It should be possible to use "count(distinct field)" with "group by"

        Attachments

          Issue Links

            Structure

              Activity

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  klalia Keerat Lalia
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:

                    Structure Helper Panel