Distinct Tables Values: 90%

This PR allows the ability to do distinct queries on table columns
Could we use the ```_ID_TYPE``` constant?