About 54 results
Open links in new tab
  1. sql - Selecting COUNT (*) with DISTINCT - Stack Overflow

    DISTINCT COUNT(*) will return a row for each unique count. What you want is COUNT(DISTINCT <expression>): evaluates expression for each row in a group and returns the number of unique, non …

  2. SQL to find the number of distinct values in a column

    Apr 5, 2019 · 455 I can select all the distinct values in a column in the following ways: ... But how do I get the row count from that query? Is a subquery required?

  3. sql - COUNT DISTINCT with CONDITIONS - Stack Overflow

    Dec 27, 2012 · If I want to count the number of distinct tags as "tag count" and count the number of distinct tags with entry id > 0 as "positive tag count" in the same table, what should I do? I'm now …

  4. SQL - how to count unique combination of columns

    Dec 15, 2011 · but I want the count of the number of unique combination of folderid and userid in the folder table. Is there a way to do this?

  5. SQL count(*) and distinct - Stack Overflow

    Dec 1, 2009 · COUNT () takes no parameters and cannot be used with DISTINCT. COUNT () does not require an expression parameter because, by definition, it does not use information about any …

  6. Contar registros iguais com SELECT DISTINCT e COUNT

    Contar registros iguais com SELECT DISTINCT e COUNT Perguntada 11 anos, 6 meses atrás Modified 5 anos, 6 meses atrás Vista 82mil vezes

  7. How can I count unique pairs of values in SQL? - Stack Overflow

    Aug 2, 2013 · With the following sql statement I can get all unique values with their counts for a given column: select column, count (column) as count from table group by column order by count...

  8. Difference Between Distinct Count () and Count (Distinct)

    May 27, 2021 · Here, because there is a single row, the distinct has no effect; there's only one row and it's always going to be distinct. But if there were multiple rows, perhaps because there's a group by, it …

  9. Using DISTINCT and COUNT together in a MySQL Query

    Jun 16, 2009 · SELECTING DISTINCT PRODUCT AND DISPLAY COUNT PER PRODUCT for another answer about this type of question, this is my way of getting the count of product based on their …

  10. SQL Server how can I use COUNT DISTINCT (*) in HAVING clause?

    Apr 20, 2016 · When outside of the COUNT, the DISTINCT will eliminate duplicate rows from a result set, which will have no effect in your query because you are doing a GROUP BY. When inside the …