I am using sql query to fetch rows from table. I want to select the rows only with distinct values and if there is no value entered for some row, that row should not be there.
SELECT DISTINCT meta_value FROM `wp_postmeta` WHERE meta_key = "aaa";
This is the query I am using, I am getting the distinct rows by this query but also getting the blank row.
Simple solution: