Can anyone help me with Oracle's Function MAX ()?
I need to do a query that returns only the last record of a history table, but I need to return 3 (three) columns of that record - > Id, Ticket_id and Queue_id, but if I use the query as below, the query does not execute because of an error in GROUP BY.
ForthequerytorunIshouldaddtheQUEUE_IDcolumninGROUPBYasfollows:
ButthiswaytheresultdoesnotreturnthelastrecordbytheMAX(ID)andinsteaditreturns2records,asbelow:
And I just need the last record, in case it would be 53474 with Queue_id 22.
Does anyone know how to create this type of query in Oracle?