straatlang
Technical User
Who can help me with this problem.
I want to create query from the Table Marketprices ?
SECURITY PRICEDAT PRICE
ABC 12/12/02 10
ABC 13/12/02 11
ABC 14/12/02 10
DEF 15/12/02 20
GHJ 13/12/02 21
GHJ 16/12/02 25
The result should the last know price and pricedate on every security but I only want to see each security ones and only the last pricedate.
Expected result
SECURITY DATE PRICE
ABC 14/12/02 10
DEF 15/12/02 20
GHJ 16/12/02 25
Can I use something like
SELECT DISTINCT SECURITY, DATE,PRICE
FROM MARKETPRICES
Can anybody help me.
I want to create query from the Table Marketprices ?
SECURITY PRICEDAT PRICE
ABC 12/12/02 10
ABC 13/12/02 11
ABC 14/12/02 10
DEF 15/12/02 20
GHJ 13/12/02 21
GHJ 16/12/02 25
The result should the last know price and pricedate on every security but I only want to see each security ones and only the last pricedate.
Expected result
SECURITY DATE PRICE
ABC 14/12/02 10
DEF 15/12/02 20
GHJ 16/12/02 25
Can I use something like
SELECT DISTINCT SECURITY, DATE,PRICE
FROM MARKETPRICES
Can anybody help me.