Top "Distinct" questions

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

How to display unique records from a has_many through relationship?

I'm wondering what is the best way to display unique records from a has_many, through relationship in Rails3. I …

ruby-on-rails unique distinct ruby-on-rails-3
Using DISTINCT in a CakePHP find function

I am writing a CakePHP 1.2 app. I have a list of people that I want the user to be able …

cakephp find distinct cakephp-1.2
Add Range of items to list without duplication

I have a List of List of Strings, and I need to use the AddRange() Function to add set of …

c# list distinct addrange
Get last distinct set of records

I have a database table containing the following columns: id code value datetime timestamp In this table the only unique …

mysql distinct
SELECT DISTINCT cql ignores WHERE clause

Executing two identical requests but the DISTINCT keyword gives unexpected results. Without the keyword, the result is ok but with …

cassandra distinct cql
MySQL Counting Distinct Values on Multiple Columns

I wrote a script that runs each time a user logs into a computer in our domain. This script makes …

mysql sql select group-by distinct
Using Hibernate's Criteria and Projections to Select Multiple Distinct Columns

Using Hibernate's Criteria, I want to execute the equivalent of: select distinct uspscity, state from citycomplete where USPSCITY = 'HOUSTON' I …

sql hibernate criteria distinct hibernate-criteria
LINQ Distinct operator, ignore case?

Given the following simple example: List<string> list = new List<string>() { "One", "Two", "Three", "three", "Four", "…

c# linq string comparison distinct
C# Distinct on IEnumerable<T> with custom IEqualityComparer

Here's what I'm trying to do. I'm querying an XML file using LINQ to XML, which gives me an IEnumerable&…

c# linq-to-xml ienumerable distinct
Android: Distinct and GroupBy in ContentResolver

What would be the correct way to add DISTINCT and/or GROUPBY to ContentResolver-based queries? Right now I have to …

android distinct group-by android-contentresolver