To select distinct values in Salesforce SOQL, use the GROUP BY clause, which groups records by unique field values, similar to the DISTINCT keyword in SQL.
Example:
SELECT Name FROM Account GROUP BY Name
This query retrieves unique Name values from the Account object. You can also combine it with aggregate functions like COUNT for more complex queries.