>Thank for your prompt reply.
>
>The results expected as:
>
>newtable also contains 3 fields
>
>order late1x late2x type
>
>11111 5 1 CL
>
>33333 11 5 PL
>
>44444 8 4 ML
>55555 9 3 ML
I haven't tried your SQL, but from what I saw it is written exactly right except for the columns order, e.g. you may want
select Order, sum(Late1) as Late1X, sum(Late2) as Late2X, Type from YouTable ;
group by Order, Type into table NewTable
What exactly is not working here? I don't see a problem.
If it's not broken, fix it until it is.
My Blog