inventory: update sql statements to reflect data more accurately