Well QlikView is heavily tuned to connect by ODBC and OLEDB. ODBC is all about SQL. If you connect with the Load Scripts wizards you will get some SQL generated following the LOAD statement. This SQL is in its entirety sent to the ODBC-driver which again sends it to the source database that the ODBC-driver supports.
It is quite straight-forward so there is no "reference guide" for this. The essential syntax is:
What you see from line 5 to 8 is in the source database/ODBC-drivers syntax. You have full freedom to take advantage of whatever is supported. What QlikView expects to received back is a set of 0 or more rows that will be processed by the LOAD statement preceding the SQL. That is lines 1 to 3. Here everything is governed by the syntax of the LOAD statement that you find in help and the reference manual.
Hope this helps.