Let me start by stating that I am not looking for help creating the full query, I am however looking for some guideline as to how to start the query and what query statements I will be needing. A little hint on why each statement is needed would be nice too. I love learning and wanna learn how to do this kind of query, I tried google and other searches, but since I am not fully sure what I am gonna need, nothing has helped so far, so I won’t even be able to provide SQL query for what I got so far, since I got nothing. So I hope there is a kind soul that can give some guidelines.
About my tables, I am creating a script for a game I like to play, if people has XYZ statement assigned to their account. Its based on 4 tables. 1 table with the past games saved with a match ID, then the next table holds match ID to player ID relation, table 3 then hold the player ID with the in-game ID whereas the last table holds info about what statement is assigned to them.
There can be up 15 players in 1 match, hence the relation tables, some players are seen more than once in different matches.
So the tables look like this: games (match ID) -> match to player (match ID to player ID) -> players (Player ID to In-game ID) -> player Info (In-game ID -> info needed to query)
So when the script is queried, I have the match owner UID which is saved with the match data in the first table with match information, it would return all the match IDs based on that owner ID, so all the match IDs then checks the next table to get all the unique player IDs, with that list then query next table to get a list of all those in-game IDs, with that list then query the last table to get each players in-game assignments.
Let me also state that I cant change the way the tables are, since all other script are depending on those.
I have tried some join statements, but none gotten what I needed and none even half what I wanted, but I do think its the usage of joins that will get me to where I need to be.
Thanks!