Work on the Sql class, join functionality