SQL select distinct rows and ignore row if blank
Try this query with IS NOT NULL
SELECT DISTINCT meta_value
FROM `wp_postmeta`
WHERE meta_key = "aaa"
AND meta_value IS NOT NULL ;
Simple solution:
SELECT DISTINCT meta_value
FROM `wp_postmeta`
WHERE meta_key = "aaa" AND meta_value != "";