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

[SQL] Is there a way to get the most recent value of a column without window functions?

Discussão em 'Outras Linguagens' iniciado por Stack, Novembro 3, 2024 às 06:42.

  1. Stack

    Stack Membro Participativo

    So, I have a database in Libre office base and I am using it for my sports club. We are playing in order of the last score earned. I want to display their name and their latest score, sorted by descending score. In my database game I have the columns ID, name, date and score. I tried using window functions that were recommended in other discussions, but it seems like that they are not supported.

    I tried using the following queiry: SELECT name, score, MAX(ID) From games GROUP BY name ORDER BY score DESC But this results in the following error Message: Not in aggregate function or group by clause: org.hsqldb.Expression@a3f0b3c in statement [SELECT "name", "score", MAX( "ID" ) FROM "games" GROUP BY "name" ORDER BY "score" DESC]

    Continue reading...

Compartilhe esta Página