Eugene Elutin (9/6/2012)
The MAT column will be ordered randomly, but Tot will still come as a last one per DVD.
I agree, that setup needs clarification about Total: is it already in a table or needs to be calculated?
thank you for help.
Total is it already in a table TestTable (in post #1 I have posted the CREATE TABLE [dbo].[TestTable] code).
I tried your query but I have this incorrect output:
MATDVDSALES
MACL123
MAEL123
MASL123
TotL129
MACL011
MASL014
TotL015
I need this:
MATDVDSALES
MAEL123
MACL123
MASL123
TotL129
MACL011
MASL014
TotL015