Changed to query file

This file held duplicate code from a previous file, so it was changed to include code for simply querying all attributes of the tables.