I have a 6 tables
table countries
country_id | short_name
table user (if status = 2 active if status = 1 inactive)
id | country_id | status
table user_subscribed_disciplines
id | user_id |discipline_id
table disciplin
id | name
table user_subscribed_study_levels
id | user_id | study_level_id
table study_levels
id | name
How to select all countries with his parameters? How to write right sql query?
country | total users count | active users count | inactive users count | discipline subscribers count | top discipline | study level subscribers count | top study level
USA | 506 | 500 | 6 | 50 | PHD | 90 | Social History
CAN | 406 | 406 | 0 | 50 | POS | 0 | Social History