I'm trying to display the title, ISBN, Cost and category where the category has the least amount of books in it, while also trying to add a "$" in front of the output for cost while trying to round it to two decimal places.
Example for category =
Technology = 4
Family = 3
Sports = 2
Business = 4
In this case I want the output to display category Sports
Select TITLE, ISBN,
Round( '$' + CAST(COST AS VARCHAR(15)) COST, 2),
CATEGORY
From BOOKS
GROUP By category
HAVING Category = ((Select Min(Category)
From (Select Count(Category) AS Category)
From BOOKS
Group By Category)
;