hey SV
here is an example of a query I created for mine but demonstrates how you can do it without the previously supplied subquery
SELECT t1.id AS domain_id, t1.domain AS domain, date_format( t1.exp_date, '%D of %b %Y' ) AS expiry, t1.for_sale AS for_sale, t1.idna AS idna, t2.name AS...