Hello there.. I need help for an sql query.
I have this db
|id |activity |team |region |others |
+-------+---------------+-------+-------+-------+
|1 |Aktivitet1 |6 |4 |1 |
|2 |aktivitet2 |6 |4 |2 |
|3 |Aktivitet3 |5 |4 |1 |
|4 |aktivitet4 |5 |4 |2 |
|5 |Aktivitet5 |4 |3 |3 |
|6 |aktivitet6 |3 |3 |3 |
|7 |Aktivitet7 |3 |3 |3 |
|8 |aktivitet8 |2 |5 |2 |
The numbers in the "others" column means:
1: Only show within the same team
2: Show my team, and other teams but in same region
3: Show my team, and other teams in all regions
How can i base my query on these criterias?
This is what i want to show
|id |activity |team |region |others |
+-------+---------------+-------+-------+-------+
|1 |Aktivitet1 |6 |4 |1 |
|2 |aktivitet2 |6 |4 |2 |
|4 |aktivitet4 |5 |4 |2 |
|5 |Aktivitet5 |4 |3 |3 |
|6 |aktivitet6 |3 |3 |3 |
My english is poor, and my explaining is poorer, hopw you understand what I mean...🙂
Bengt