The general form of an SQL query is:
SELECT <columns list> FROM <Table name> WHERE <condition>
For example to find all the red cars you might use:
SELECT * FROM Cars WHERE Colour = 'Red'
So the first thing you need to do is use something like that to find all the records you are interested in.
When you can get them - and only them - you can use use an
aggregate function
as Richard has suggested in place of the columns list.