Top "Distinct" questions

The DISTINCT keyword is used to remove duplicate values from a result of a SQL or SPARQL query.

CodeIgniter: How To Do a Select (Distinct Fieldname) MySQL Query

I'm trying to retrieve a count of all unique values in a field. Example SQL: SELECT count(distinct accessid) FROM (`…

php mysql codeigniter distinct
Select DISTINCT individual columns in django?

I'm curious if there's any way to do a query in Django that's not a "SELECT * FROM..." underneath. I'm trying …

django django-models distinct django-queryset django-orm
how to select rows based on distinct values of A COLUMN only

I need to query a table in order to return rows, but I am not able to query the table …

sql sql-server tsql distinct
count distinct values in spreadsheet

I have a Google spreadsheet with a column that looks like this: City ---- London Paris London Berlin Rome Paris …

count google-sheets distinct
SQL - select distinct only on one column

I have searched far and wide for an answer to this problem. I'm using a Microsoft SQL Server, suppose I …

sql sql-server unique distinct
Oracle 11g SQL to get unique values in one column of a multi-column query

Given a table A of people, their native language, and other columns C3 .. C10 represented by ... Table A PERSON LANGUAGE ... …

sql oracle distinct
How to execute UNION without sorting? (SQL)

UNION joins two results and remove duplicates, while UNION ALL does not remove duplicates. UNION also sort the final output. …

sql union distinct union-all
Huge performance difference when using group by vs distinct

I am performing some tests on a HSQLDB server with a table containing 500 000 entries. The table has no indices. There …

sql performance group-by distinct hsqldb
sql query distinct with Row_Number

I am fighting with the distinct keyword in sql. I just want to display all row numbers of unique (distinct) …

sql distinct
Count distinct value pairs in multiple columns in SQL

What query will count the number of rows, but distinct by three parameters? Example: Id Name Address ============================== 1 MyName MyAddress 2 MySecondName …

sql count distinct