Hello,
I have a table has some fields like the following:
The table name is users
id* int autoincrement
join_date datetime
age_year int
age_month int
id =>1
join_date=>2007-05-11 00:00:00
age_year=> 19
age_month=> 0
Suppose after two years from the join_date 2007-05-11 i.e 2009-05-11, I'd like to select all members of age_year > 20.
How can I write a SQL statement's query to return the previous row as a part results?