User Answers

Another approach, which would give you all patients 13 years old and older in the current calendar year is to write something like this:

SELECT COUNT(*) FROM HSAA.Patient WHERE (DATEPART('yy',CURRENT_DATE) - DATEPART('yy',BirthDate)) >= 13

This is just an example and there are probably different ways to write this to ensure you're executing the query in the most efficient way possible (if that is important for your needs).

As Eduard mentioned there are a couple of different approaches, depending on what your needs are.  Here are some simple classes to use as examples: