1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

[SQL] Sort Month Name in SQL Query

Discussão em 'Outras Linguagens' iniciado por Stack, Setembro 27, 2024 às 15:42.

  1. Stack

    Stack Membro Participativo

    My Current Query is :

    SELECT FORMAT(Date, 'MMM') as 'Date', FORMAT(Date, 'yyy') as 'Year'
    ,COUNT(*)
    as 'Tickets Generated'
    FROM [SambaData2].[dbo].[Tickets]
    GROUP BY FORMAT(Date, 'MMM'), FORMAT(Date, 'yyy')
    ORDER BY Date


    It returns the values:

    [​IMG]

    I would like the same query to return sorted month name with Year!

    Continue reading...

Compartilhe esta Página