2
I have the following table:
*********************************
* IdPessoa * DataVen * Observ *
* 10000000 * 01/01/15 * Teste1 *
* 10000001 * 01/01/15 * Teste2 *
* 10000000 * 01/01/12 * Teste3 *
* 10000001 * 01/01/13 * Teste4 *
* 10000001 * 01/01/11 * Teste5 *
* 10000000 * 01/01/14 * Teste6 *
* 10000001 * 01/01/14 * Teste7 *
*********************************
I’d like to return the records IdPessoas
with its lowest values of DataVen
. Example:
* 10000000 * 01/01/12 * Teste3 *
* 10000001 * 01/01/11 * Teste5 *
I would like to do this using Linq. I am using Entity Framework.
you want to group by the lowest values of Dataven ? or sort by the lowest value ?
– Thiago Friedman
It is , is confused, the way it is difficult to answer, try to make clearer what you want, if possible show better examples or what you did. Enjoy learning to use the correct terms: http://answall.com/q/79894/101
– Maniero
Group by Idpessoa and Dataven.
– cumpadi
How many "lowest values" do you want to return? You are using Entity Framework?
– Leonel Sanches da Silva
I can have n Idpeople and n Dataven for these ids. I would like to filter only the lowest values of Dataven by Idpessoa. I’m using Entity Framework.
– cumpadi