Complex Calulcation from multiple tables and Graph help is needed

So I have 3 entities:

  1. User
  2. Attributes
    and an option set
  3. Attribute Options

Attribute options contains all possible attributes a user can have and on new user creation I take those options and make the attributes of that user and assign the user the attributes.
Attributes


User

Now, it’s for a dating app and I need to generate stats and make complex queries.
For example, in the current setup, every user has ten fields via attributes.
I need to tell the user how many people in the app match him Low, Medium, High.

  1. Low being the user matches max 3 attributes with him
  2. Medium being the user matches max 6 attributes with him
  3. High being the user matches all attributes with him

Now I need to find list of these users and also need to calculate total percentages of these 3 to show in graphs.

Any help on this would be very appriciated.

Thanks in advance.