Search
 
SCRIPT & CODE EXAMPLE
 

SQL

sql distinct only one column

SELECT DISTINCT column_name
FROM table_name
Comment

distinct For only one column

SELECT *
  FROM (
                SELECT  ID, 
                        Email, 
                        ProductName, 
                        ProductModel,
                        ROW_NUMBER() OVER(PARTITION BY Email ORDER BY ID DESC) rn
                    FROM Products
              ) a
WHERE rn = 1
Comment

PREVIOUS NEXT
Code Example
Sql :: mysql stored procedure vs function 
Sql :: failed to connect to mysql at localhost:3306 with user root 
Sql :: mysql remove first and last character from string 
Sql :: between sql 
Sql :: oracle partition table row count 
Sql :: PostgreSQL types and C# types 
Sql :: insert array postgresql 
Sql :: insert into using contant values and source table columns with sql 
Sql :: host 127.0 0.1 is not allowed to connect to this mysql server 
Sql :: postgres update with if condition query 
Sql :: sort by mysql 
Sql :: sql number columns 
Sql :: sql parent child tree query 
Sql :: oracle list proxy users 
Sql :: postgres update single column 
Sql :: importing excel data into sql server 
Sql :: oracle alter table add column default value 
Sql :: Save PL/pgSQL output from PostgreSQL to a CSV file 
Sql :: list table columns sql 
Sql :: recursion in sql 
Sql :: creating table in sql 
Sql :: oracle current session details 
Sql :: sql update multiple columns 
Sql :: get largest number in database sql 
Sql :: sql column name 
Sql :: oracle parameter 
Sql :: mysql on duplicate key update get value from values 
Sql :: How to get last inserted primary key in SQL Server 
Sql :: truncate your answer to decimal places mysql 
Sql :: oracle chain rules 
ADD CONTENT
Topic
Content
Source link
Name
1+6 =