I wish I didn't have to write this with SQL. But never mind.
I have a table:-
Deployment.
It contains:-
batch id (int)
deployment (datetime)
e.g.
1,13/09/2015
2,14/09/2015
3,15/09/2015
4,10/09/2015
2,11/09/2015
3,12/09/2015
Also:-
Batch.
Containing
batch id (int)
batch type(int)
I am trying to return the batch id, deployment, type
But I only want to return the most recent row for each batch type.
So I am completely stuck; mainly because I know stuff all about SQL. But the join would appear to need some sort of select max(deployment). No idea what though.
I have a table:-
Deployment.
It contains:-
batch id (int)
deployment (datetime)
e.g.
1,13/09/2015
2,14/09/2015
3,15/09/2015
4,10/09/2015
2,11/09/2015
3,12/09/2015
Also:-
Batch.
Containing
batch id (int)
batch type(int)
I am trying to return the batch id, deployment, type
But I only want to return the most recent row for each batch type.
So I am completely stuck; mainly because I know stuff all about SQL. But the join would appear to need some sort of select max(deployment). No idea what though.
Comment