Write queries to selectively retrieve values