SELECT Min(Photos.Filename) AS MinOfFilename, Photos.CategoryID, categories.category
FROM Photos INNER JOIN categories ON Photos.CategoryID = categories.categoryID
GROUP BY Photos.CategoryID, categories.category
ORDER BY categories.category;
John Blue Photo Complex