I have been pulling my hair on how to translate my business requirement into a SQL query.
The case in itself is not that complex. I have two main tables user
user