About 50 results
Open links in new tab
  1. mysql - How to use COUNT with multiple columns? - Database ...

    9 Obviously, COUNT(DISTINCT) with multiple columns counts unique combinations of the specified columns' values. However, one other important point is that a tuple is counted only if none of the …

  2. sql server - Select Distinct for Multiple columns - Database ...

    Aug 24, 2016 · For instance, if you tried to apply this method to this two-column set: (1, 3), (1, 2), (2, 3) to select two distinct rows, you might only get one if the first selected row happened to be (1, 3).

  3. postgresql - SELECT DISTINCT on multiple columns - Database ...

    May 28, 2015 · Supposing we have a table with four columns (a,b,c,d) of the same data type. Is it possible to select all distinct values within the data in the columns and return them as a single …

  4. postgresql - Calling SELECT DISTINCT on multiple columns - Database ...

    Mar 9, 2018 · I am unclear on exactly on, SELECT DISTINCT col1, col2, ... FROM table_name When called on one column it gives back only distinct values of that column. What happens when we use it …

  5. How to select distinct for one column and any in another column?

    I need to query an SQL database to find all distinct values of one column and I need an arbitrary value from another column. For example, consider the following table with two columns, key and val...

  6. sql server - Trying to Count Multiple Columns SQL - Database ...

    Apr 14, 2020 · I'm trying to count multiple columns in a select statement for a class I'm in. Everything is coming from the same table. I want to know how many times that person paid something and how …

  7. SELECT DISTINCT on one column, while returning the other columns?

    I have a query which uses three lookup tables to get all the information I need. I need to have DISTINCT values for one column, however I also need the rest of the data associated with it. My SQL...

  8. Select distinct multiple columns with one result column

    Feb 1, 2017 · Select distinct multiple columns with one result column Ask Question Asked 9 years ago Modified 9 years ago

  9. sql server - Is there a way to get count based on multiple columns but ...

    Jul 9, 2019 · Is there a way to get count based on multiple columns but still have it be distinct in SQL? Ask Question Asked 6 years, 7 months ago Modified 6 years, 7 months ago

  10. sql server - Sum multiple columns, based on distinct values in ...

    Feb 5, 2021 · Sum multiple columns, based on distinct values in different Columns Ask Question Asked 5 years ago Modified 3 years, 4 months ago