Pulled from upstream

Added new query for SQL Pull from Database