Skip to content

Support group by in query builder #1737

Closed

Description

@tlammer

Requested by Willem. He would like to be able to get back counts on the different values in a field; so the query would say for field 1, this many records say x, this many say y, etc.

Willem's email:

I wonder if the ‘count’ function wouldn’t be more useful if it simulates the conventional database function in the way that results are output. Instead of a pop-up giving you the count, the count could be in a row in the results of the query (please see below).

I also wonder if ‘distinct’ is the best way to name this function, or if ‘group’ would be better. (the way I remember this in access is that you will get the count of the records in the field that ‘introduces different values’). Below it is the Text5 field that introduces different values while the accession number has the same value throughout the results.

image

(I have used the preparationproperty table as a ‘specimen audit’ table, meaning that whenever we conduct an audit of samples, we create another record in this table to say whether the sample is present or not)

image

I imagine that if we had this kind of display, we could perhaps include the aggregated output. So, if a sample had two audit findings, namely in Audit 1 it was present but in Audit 2 it was not present, it would be listed in a row of its own:

Present 42

Not present 86

Present; Not present 1

Activity

  1. changed the title [-]Add counts for conditions on a field[/-] [+]Support group by in query builder[/+] on Mar 14, 2023
  2. maxpatiiuk commented on Mar 14, 2023

    @maxpatiiuk
    Member

    This sounds like GROUP BY feature

    It would be useful for future stats page features and advanced querying workflows

  3. added
    2 - QueriesIssues that are related to the query builder or queries in general
    and removed on Jul 2, 2023
  4. locked and limited conversation to collaborators on Dec 20, 2024
  5. converted this issue into a discussion #5595 on Dec 20, 2024
  6. moved this from 📋 Backlog to ✅ Done in Back-End Backlogon Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

1 - RequestA request made by a member of the community2 - QueriesIssues that are related to the query builder or queries in general

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions