Unsupported Screen Size: The viewport size is too small for the theme to render properly.

Forum Replies Created

Viewing 1 post (of 1 total)
  • Author
    Posts
  • in reply to: Feature Request: Select Distinct Values For A Column #34940
    cmm324
    Member

    Hi, sorry for the delay in responding and I completely understand your position re:workbench.

    The values from the query you provided could be useful but I was looking for something simpler like this:

     


    SELECT
    DISTINCT columnname as distinct_values,
    COUNT(*) as occurrences
    FROM tablename
    GROUP BY distinct_values;

    I find myself doing this often when working with table structures that make use of codes or integers for relation tables, like an id or code for a status column.

Viewing 1 post (of 1 total)