Prakash Mondal

Prakash Mondal

  • NA
  • 288
  • 209.1k

get all records of last row of every roll no

May 16 2020 8:18 PM
My data base table with value using SQL Server 2008 R2
 
ROLL NO SLNO TXN DATE CLOSING AMOUNT
16CS1001 1   700
16CS1008 2   1000
16MA1006 1   1300
16CS1001 2   800
16CH1201 1   1000
16CS1008 1   1600
16MA1006 2   1200
16CH1201 2   500
16CS1008 3   900
16MA1006 3   700
16CS1008 4   500
 
 I want to get out put
 
ROLL NO SLNO TXN DATE CLOSING AMOUNT
16CS1001 2   800
16CS1008 4   500
16MA1006 3   700
16CH1201 2   500
 
 
 Please give me a sql query to sorting this.
 

Answers (5)