Search
 
SCRIPT & CODE EXAMPLE
 

SQL

ORACLE: How to get all column with GROUP by only 1 column?

SELECT t.FIRST_NAME,
       t.LAST_NAME,
       t.EMP_ID,
       t.WRIST_STATUS,
       t.LFOOT_STATUS,
       t.DATE
FROM
(
    SELECT FIRST_NAME, LAST_NAME, EMP_ID, WRIST_STATUS, LFOOT_STATUS, DATE,
           ROW_NUMBER() OVER (PARTITION BY EMP_ID ORDER BY DATE DESC) rn
    FROM ESD_RESULTS
) t
WHERE t.rn = 1
Comment

PREVIOUS NEXT
Code Example
Sql :: sql server manager close connection 
Sql :: t-sql cheat sheet 
Sql :: sql server set column name as variable 
Sql :: sql on-premises 
Sql :: hierarchal database table 
Sql :: cube oracle 
Sql :: postgresql interview questions 
Sql :: Reorder Table Primary Key Index After Deleting Some Rows 
Sql :: storing RGBA in mysql db 
Sql :: where in clause tsql 
Sql :: script to run SP_SPACESED on all tables in DB 
Sql :: postgresql between month 
Sql :: create relationship with betwen two tables in postgersql 
Sql :: sql eomonth(getdate) 
Sql :: AND Operator (AND) 
Sql :: radius search with point data in mysql 
Sql :: oracle database connection visual studio 2019 
Sql :: sql varchar(255) 
Sql :: CREATE MULTIPLE FK 
Sql :: nuget sqllite-net-pcl 
Sql :: oracle sql date summer time 
Sql :: sparql comment multiline 
Sql :: Laravel: customize or extend notifications - database model 
Sql :: hoq to import database source 
Sql :: SQL FULL OUTER JOIN With AS Alias 
Sql :: ltrim in sql 
Sql :: #configuration database using PostgreSQL in ubuntu 
Sql :: composit key in sql 
Sql :: Laravel SQLSTATE[HY093] with array query 
Sql :: check constraint is violated 
ADD CONTENT
Topic
Content
Source link
Name
4+5 =