Top "Distinct" questions

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

sql group by versus distinct

Why would someone use a group by versus distinct when there are no aggregations done in the query? Also, does …

mysql sql-server performance group-by distinct
Can you create a simple 'EqualityComparer<T>' using a lambda expression

Short question: Is there a simple way in LINQ to objects to get a distinct list of objects from a …

c# linq distinct
Select distinct ... inner join vs. select ... where id in (...)

I'm trying to create a subset of a table (as a materialized view), defined as those records which have a …

oracle select distinct inner-join materialized-views
SQLite - SELECT DISTINCT of one column and get the others

I have a table like this (but with more columns): Code Quantity ----- -------- 00001 1 00002 1 00002 1 00002 2 00003 2 00003 1 And I want to get the …

ios sqlite select distinct
Error Message: TOK_ALLCOLREF is not supported in current context - while Using DISTINCT in HIVE

I'm using the simple command: SELECT DISTINCT * FROM first_working_table; in HIVE 0.11, and I'm receiving the following error message: …

sql hadoop hive distinct bigdata
Produce DISTINCT values in STRING_AGG

I'm using the STRING_AGG function in SQL Server 2017. I'd like to create the same effect as COUNT(DISTINCT <…

sql sql-server distinct sql-server-2017 string-aggregation
Select distinct from usercolumn and minimum value of dates for each field in usercolumn

I have some data like this but more than 1500000 records and more than 700 users: usercolumn , datecolumn\ a1 , 1998/2/11\ a2 , 1998/3/11\ a1 , 1998/2/15\ a4 , 1998/4/14\ …

sql distinct aggregate-functions minimum
MongoDB: How to get distinct list of sub-document field values?

Let's say I have the following documents in collection: { "family": "Smith", "children": [ { "child_name": "John" }, { "child_name": "Anna" }, ] } { "family": "Williams", "…

mongodb distinct nosql
Converting SELECT DISTINCT ON queries from Postgresql to MySQL

I've been using PostgreSQL and now migrating to MySQL. In my queries, I'm using PostgreSQL's SELECT DISTINCT ON (col1, col2, …

mysql postgresql select group-by distinct
PostgreSQL does not allow me to group a column with order

In PostgreSQL i want to fetch every users at once and order them by date. This is my query: SELECT …

postgresql group-by distinct distinct-on