Last active
July 18, 2019 19:54
-
-
Save jfbueno/75a650b6a1ab1588f5f4fdb0ad6e0f63 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Apenas clientes com mais de uma compra | |
var aggComFiltro = grupos.Where(gp => gp.Count() > 1).Select(gp => new | |
{ | |
Cliente = gp.Key, | |
PiorCompra = gp.Where(c => c.Valor > 150).Min(x => x.Valor) | |
// Apenas compras acima de 150 | |
}); | |
foreach(var elemento in aggComFiltro) | |
{ | |
WriteLine($"Cliente: {elemento.Cliente}"); | |
WriteLine($"Pior compra (acima de 150): {elemento.PiorCompra}"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment