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 can I immpove the design on this asp.net form
Cisco VLAN Routing Problem
How do I improve ASP.NET application performance ?
UPDATE command
sort pivot table
Password history and length: Group Policy
Oracle database (32-bit) Vs Oracle Database (64-bit) on Windows Operating System
Text to Column in Microsoft Excel 2007
Cisco ASA 5505 ssh default username and password
Display data from fields in multiple tables on a single report