First you need to load from a database or any other data source and store that info into QVD files. Once you have populated your QVD file, you can LOAD either using the dialog in the script editor or hardcoding your fields and conditions,
LOAD Field1, Field2 FROM FILE.QVD (QVD) WHERE Field1 = 'A';
Hope that helps
If you want to do joins at Qlikview end then load databse tables and store them separately as qvds, then fetch from a single qvd with where clause and do left / right / inner join then fetch from another qvd with where clause in this statement. Provided there must be a column with same name in both qvds.
WHERE ( P = 'XYZ')
LEFT JOIN (TAB1)
WHERE (Q = 'ABC')
You can do this before storing qvds and then store the joined tables into qvd.