Ok guys,
Sorry for the long title but I kind of want to lift my own confusion about this one.
I've been tasked to clean up/improve some stored procedures in one of our product databases,now this procedure is not from my hand and has been around for longer then I've graduated from college.
Simplified it's this
select A1.ID,A1.Quantity,(B1.Value/A1.Quantity) as ValuePerUnit
from A1
inner join B1 on A1.identity = B1.identity
where A1.identity = B1.identity
Why would anyone do this