yes that looks correct.
w3scools has a decent tutorial for joined queries:
sql_join.asp
To export the results to excell or csv, you would need to hand code that. there are many resources online that talk about how to do that, here is one i found through a google search:
dataexport/