Latest Price for Material base on Invoice

Does PartCost not have the info you need in LastmaterialCost?

If not a top 1 subquery sorted in descending order grouped by part should work.

here is a thread.