Reputation: 67
For class, I was required to find the range of the convicts but some of the ages are -1
because it is unknown.
How do I filter the -1
and use the lowest positive number?
Here are some pictures explaining what doesn’t work and what the result is when I try it.
This is my database:
This is how it looks:
What doesn't work?
-1
in the property sheet-1
afterwards on the query>0
into the criteria>0 and <100
into the criteriaI spent three lessons trying to solve this, please help!
EDIT:
Upvotes: 0
Views: 669
Reputation: 3455
This looks fine for me:
SELECT
Min([Age leaving england]) AS MinAge,
Max([Age leaving england]) AS MaxAge
FROM
Convicts
WHERE
[Age leaving england] <> -1
To use it, switch the view of your query to sql
and paste the query.
Edit:
This is how the query looks in design view:
Upvotes: 1