I need to find the age of student when he was readmitted to a class.
Now to do this I have one table student\_history hence first needed to retrieve the "admin\_date" admission date from student history when student status equals to 'RE-ADMIN're admitted. And then to check if admin\_date is greater than admin\_date of last Readmission 'RE-ADMIN' or Completed 'COMP' in records.
Now the query is not working as it should be and running into different errors.

```
SELECT
    s.admin_date
FROM
    student_history s
WHERE
    student_st = 'RE-ADMIN'
    AND
    s.admin_date > (
        SELECT
            s.admin_date
        FROM
            s
        WHERE
            student_st IN('RE-ADMIN','COMP')
    )

```

couple of similar links researched.

[Age Calculation Query](https://stackoverflow.com/questions/14465010/age-calculation-query)
[comparison query taking ages](https://stackoverflow.com/questions/10040908/comparison-query-taking-ages)