6
I have a Products table with:
ProCodigo - Primary Key de Produto
ProNome
And another Price History table with:
HisCodigo - Primary Key de Histórico
HisData
HisPreco
ProCodigo - Foreign Key de Produto
I need to assemble a SELECT that brings the products with the current price, ie the most recent price of the History table, but so far I could not do.
Can someone help me?
You want to mount SQL via C# (Linq) or via sql code to run in the database?
– Randrade
SQL code to run in the database
– André Morais Martins