added a few additional queries and instructions for SELECT and DISTINCT