I'm pretty newbies for SQL Querying, would like to know, when we have a very long SQL query with multiple table, and then we have some data missing which is expected to shown but not, how to check this ? I mean how to break this very long query but all inter-connected each other.
I have a very long and complex query, by using SQL Formatter, I would have almost 900 lines (if I copied the query to Excel, just to see it more clear). It is contain many tables so I'm wondering how to check all this when I have some problem with the data. Like currently I have missing data, which in the main table (the primary table) it is exists, but with this very long query with join to many tables, the data is not coming out.
And what is the technique or the activity of looking at this problem ? cause I want to take a look whether there is a specific courses about this only. If I search courses online, about SQL or data analyst, typically I get the full course, from beginning like how to create table, how to join, sub querying, filtering, aggregates, stuff like that, which I know it a bit much. What I don't know is how to handle an issue when there is no data come out or the result is wrong from a very complex query. How to get the exact place within the long query, is the main problem that my data is not come out or wrong.
Any advice is much appreciated. Also about what and where to look for such courses maybe in Udemy or any such online training.
Thanks in advance.