using the datediff function and avg function in the same statement
<p>I am VERY new to any language. In sql, I'm trying to find the avg of data using the datediff function to compute the age.  I know the ages, but I simply have no clue as how to write the statement.</p>

<p>when I run this statement, I get the information I'm looking for. However, I also need to use the datediff function to compute the age from the DOB. This is where I get lost.  Here is what I have, and I get an error when I run it.</p>

<pre><code> select firstname,lastname, dob
  SELECT DATEDIFF(day,'1970-01-01','1978-05-27') AS DiffDate
  where occupationId = 164 and gender = 'M';
</code></pre>

<p>Again, I new to this and have researched for and answer and to get understanding. I need help.</p>