How to solve this issue?

We have multiple tables like assessments, shared_ounits, shared_referrals, referral_assessments and additional_assessors.
We need add a custom select box with multiple options like

My Assessments,
Ounit Assessments,
Shared Assessments,
Recieved Assessments
All Assessments

How can we get the data and record on change with select box
How can we use group by after joined multiple tables.?
How can we get solution with user_id applied and without user_id ?
How can we apply dates onchanges with condition?
How can we changes complete onChanges select box?
How can we write custom query with multiple tables and dynamic parameter like user_id and other_id?
How we can change complete query with change of select box values these select box values not from any table.?

Condition is below

-------------------------------------------------------------------------

All Assessments
assessments => condition ounit_id 	
shared_ounits => condition shared_ounit_id and assessments created between start_date and end date of ounit_id
shared_referrals => condition shared_ounit_id and assessments created between start_date and end date of ounit_id
referral_assessments =>	condition referral_id

Recieved Assessment
shared_ounits => condition shared_ounit_id and assessments created between start_date and end date of ounit_id
shared_referrals => condition shared_ounit_id and assessments created between start_date and end date of ounit_id
referral_assessments =>	condition referral_id

Shared Assessment
shared_ounits => condition ounit_id and assessments created between start_date and end date of ounit_id
shared_referrals => condition ounit_id and assessments created between start_date and end date of ounit_id		

Ounit Assessment
assessments => condition ounit_id

My Assessment
assessments => condition  user_id
additional_assessors => condition o_user_id
------------------------------------------------------------

Hi @Warrenlautz,
Thank you for your question. This question may be difficult to answer through the community forum. I will message you privately to discuss possible solutions.