Use the More Data Sources ADO or RDO (you'll end up using ODBC). You can paste then paste in your SQL.
There are limitations, so I would suggest using a View or a Stored Procedure.
Some of this is dependent upon twechnical information that you didn't share, such as the software used (database and the connectivity?), basic essential infomation required when analysing any process.
-k