Microsoft
Software
Hardware
Network
Question : SELECT THE FIRST DATA
Hi All,
Suppose I have below data :
Customer TrsNo TrsDate Qty
A A1 01/01/2010 5
A A2 01/31/2010 10
B B1 01/02/2010 10
B B2 01/05/2010 5
B B3 01/29/2010 10
I want the result query :
Customer TrsNo TrsDate Qty
A A1 01/01/2010 5
B B1 01/02/2010 10
I want the first transaction date of each customer.
How could I do it?
Thank you.
Answer : SELECT THE FIRST DATA
Select Customer ,TrsNo ,TrsDate ,Qty
FROM (
Select Customer ,TrsNo ,TrsDate ,Qty,
rn = row_number() over (partition by Customer order by TrsDate ASC)
from tbl
) SQ
Where rn=1
Random Solutions
How do I select the first row from each subset of data within a query result?
Vmware and VMFS question - please advise!
Delete mailbox from Exchange 2007
Saving 3ds Max 2009 files taking ages !!
I"m getting an undefined index error message on this script.
SMS collection help
adding new site and subnet to network
How do I reset the palette position in Mathematica?
SBS 2003 - Cannot connect to Exchange on LAN
Excel - Automatically copy a worksheet template to a new worksheet