AWS Config SQL doesn’t support “distinct,” but you can achieve that with a GROUP BY (e.g. to list all the types of resources in your AWS account):
select resourceType group by resourceType
Note that this only gets you resources that AWS config crawls, so it may not be 100% of what you’ve deployed…