I have the following tables in Microsoft SQL Server:
- Users: Includes uID (primary key), birthDate, name
- Conversations: Includes convID (primary key), hostID (foreign key for uID in Users)
- Participants: Includes uID (foreign key for uID in Users), convID (foreign key for convID in Conversations).
I need to write a query which finds the name, ID and birth date of the oldest user who didn’t participate in any conversation, and that his name contains the letter ‘b’. If there is more than one user, I need to return all of them.
I don’t know how to both filter the users, and than find those with the minimal birth date (the oldest).