proc sql;
create table Expenses1 as
select FlightID,Date,Expenses
from Expenses;
quit;
The Date is in datetime format (ie 02DEC1999). Here is sample output
FlightID Date Expenses
0101 02DEC1999 55
0101 14DEC1999 125 want to see
0102 26DEC1999 155 want to see
0102 09DEC1999 25
In this example I want to see the last transaction by date only (ie the last transaction for FlightID 0101 and 0102 I read about using .First and .Last but need assistance in how to use the first and last transaction to show data
create table Expenses1 as
select FlightID,Date,Expenses
from Expenses;
quit;
The Date is in datetime format (ie 02DEC1999). Here is sample output
FlightID Date Expenses
0101 02DEC1999 55
0101 14DEC1999 125 want to see
0102 26DEC1999 155 want to see
0102 09DEC1999 25
In this example I want to see the last transaction by date only (ie the last transaction for FlightID 0101 and 0102 I read about using .First and .Last but need assistance in how to use the first and last transaction to show data