I have a table that keeps a client’s record and its duration in operation. sql needs to return me only the last client term (the most recent one). no code can be repeated follows the result that sql should show me:
Assuming your final field is DATE type: SELECT codigo, MAX(final_vigencia) FROM sua_tabela GROUP BY codigo;
Could add some code to the question?
– Boneco Sinforoso