Get row with maximum in one column The task: What ingredients has the maximum amount of content in Pancake?

The tables:
Recipe (Name, group)
Ingredient (Iname, price)
Composition (Name, Iname, Amount)

I tried this query:

Select Iname, Amount
From Composition
Where Name='Pancake'
Ordered by Amount ASC


But it does not return the correct result. What's wrong with it?
The typo in ORDER BY aside, you need descending sort order to get the ingredient with the maximum amount first.

SELECT Iname, Amount
FROM   Composition
WHERE  Name = 'Pancake'
ORDER  BY Amount DESC
FETCH  FIRST 1 ROWS ONLY;


Assuming Amount is defined NOT NULL.

FETCH FIRST 1 ROWS ONLY is the syntax defined by the SQL standard and supported by several RDBMS, but not all. Depending on your undisclosed RDBMS you may need a different syntax variant. Here is a pretty complete list:

https://en.wikipedia.org/wiki/Select_(SQL)#FETCH_FIRST_clause