Added distinctOn sql part
Added DistinctOn method for postgres specific DISTINCT ON functionality
New test method for DistinctOn method