Without actually giving all the details of my query: Is there a way of joing the results of two separate queries on different tables?
for example if i had a table
None of this (temp tables, joining two result sets) is necessary.
You are much better off writing queries directly from your source tables. Not only for performance reasons (1 query is obviously better than 2 joined queries plus one), but for your understanding and progress.