improved queries for stock status select