1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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

[SQL]ORACLE - Order By data and rows with the same id

Discussão em 'Outras Linguagens' iniciado por Stack, Janeiro 13, 2021.

  1. Stack

    Stack Membro Participativo

    I have this table with this data:

    id parent_id date
    1 1 10/01/2020
    2 2 09/01/2020
    3 2 11/01/2020
    4 3 05/01/2020
    5 2 01/01/2020

    How i can group all rows with the same parent id and order by date?

    I want this result:

    3 | 2 | 11/01/2020
    2 | 2 | 09/01/2020
    5 | 2 | 01/01/2020
    1 | 1 | 10/01/2020
    4 | 3 | 05/01/2020


    Not sure about advanced grouping or how to handle it. Any help is greatly appreciated.

    Continue reading...

Compartilhe esta Página