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
Java Client Update Error
Error 3078 can't find table
increase incoming mail size server 2008
Excel Interop, VB.Net, process can't be destroyed
How to move exchange2003 to exchange2007
VB.Net String remove everthing after second space in string
PHPList Email Campaign Manager - Mysql Query to get detailed info
SQL Server 2008. Cannot log in the first time after installation.
Problems uninstalling Office 2007
IIS InterviewH