Connect to, join, and run tests on each row of data

Hi, I am new to UiPath path and having trouble with some of the more complex elements related to database management and was hoping I could get help from the masters.

I have two different tables in a database in Microsoft SQL Server. I am attaching two sample files below of the tables with de-identified data.
Dummy Employee Data.xlsx (61.5 KB) Dummy Inv Data.xlsx (1.6 MB)

  1. I want UiPath to run the following code to join them:
    SELECT Transactions.Employee, Employees.Hire_Date, Employees.Termination_Date, Transactions.Transaction_Date, Employees.Employee_Name, Transactions.Expense_Amount, Transactions.Payment_Type, Transactions.Vendor,
    Transactions.Purpose, Transactions.City_Location, Transactions.Expense_Type, Transactions.Report_Name, Employees.Active
    FROM Employees INNER JOIN
    Transactions ON Employees.Employee_ID = Transactions.Employee_ID
    ORDER BY Employees.Active

Is this going to be a nonquery?

  1. Using the two columns from my Employee Table, I want UiPath to take Termination Date - Hire Date = range of dates while employee is employed.

  2. I want to compare the transaction date column with the range of dates to ensure expenses occurred while the employee was with the company.

How do I run all of those operations within UiPath?

Solution found, don’t worry about this problem.