I have been tasked with creating a list of inactive users from a database. The database has a list of users in one table (users) and a list of the classes those users have signed up for in another (users\_classdetails). The users\_classdetails page has columns for userID and dateEntered (which is a timestamp). Users has typical data such as id, name, address, phone, and so on.

I need a SQL query that will get me a list of users that haven't signed up for a class in the last three years. I can get a list of users that signed up for classes more than three years ago, but it doesn't take into account if they signed up recently. Whats the best way to go about this?

The users table

```
id, username, firstName, lastName, email, phone, address

```

The users\_classdetails

```
id, userID, classID, dateEntered

```