mysql query with conditions check : I have a table where it contains user details. Now I need to execute a mysql query which satisfies the below conditions

There are two tables
1) user table - which contains userid,name,firstname,
2) category table - which containts categoryid, category type, assinged userid

Now I want to execute the query which satisfies the below condition 

A User can only sees a category with a type of  simple,complex and which are assigned only to his userid and that category shouldn't get assigned to any another userid.

Anyone please help me in this.

