If I understand the question correctly, you could use
TOP N
for that. Something like
SELECT TOP 1
dim_product.product_name,
Sum(fact_sales.units_sold) AS SumOfunits_sold
FROM dim_product
INNER JOIN fact_sales ON dim_product.product_code = fact_sales.product_code
GROUP BY dim_product.product_name
ORDER BY Sum(fact_sales.units_sold) ASC;
For more information on TOP N, see
ALL, DISTINCT, DISTINCTROW, TOP Predicates - Access[
^]