• You show in your setup that your table already holds the calculated Total record (looks like it is total per DVD). Then to sort results as you want you need to do simply that:

    SELECT [MAT],

    [DVD],

    [SALES]

    FROM TestTable

    ORDER BY DVD DESC

    ,CASE WHEN MAT = 'Tot' THEN 1 ELSE 0 END

    ,MAT

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]