0
Sub-Select para comparar valores ?
De que forma posso criar um sub-select para exibir o valor menor do que o atual ? --- tab. fun ------ | nome | salario | | chirs | 200 | | tom | 1200 | | alan | 800 | Exibir: tom > cris tom > alan alan > cris
3 ответов
+ 1
Hola Alex, decime si es algo así lo que necesitas:
SELECT f.nome, ff.nome AS name FROM fun AS f JOIN fun as ff WHERE f.salario > ff.salario
No tengo un IDE para probarlo pero debería funcionar.
Saludos
0
SELECT f.nome, ff.nome AS NAME
FROM funcionarios AS f
JOIN funcionarios as ff
WHERE f.salario > ff.salario;
- 1
I think you can store the values in a HashMap, sort it by value and then return the previous value.
https://www.javacodegeeks.com/2017/09/java-8-sorting-hashmap-values-ascending-descending-order.html