A Diagram of the 'Connections'
logo (image) placed on the Template
The Chart uses the same dataource & is placed on the template
Table (pebs_1)
Table (pebs_2)
joined
The 2 Tables are JOINED.  The desired datafields selected and Casts, Expressions & other functions applied as appropriate.
A datasource is made on the Query.The datasource is like a 'mirror' of the Query and is now a floating layer of data -- accessible by Charts, Templates, Applications, etc.  
An Action is created automatically that links the Query to the Datasource.
The XML for your Template is stored safely in your account.The Template loads the XML when launched.
Click the pdf icon.  The XML is Saved - and pulls the datasource, merging it into the static template XML.  The PDF is then processed on the server.
The Template
PDF
Developing a Rudimentary Benefit Statement: a Personalized PDF for Print
STEP 1
So the basic problem is we have data 'way over there' where it's not helping us a whole lot.  
We could data enter all of that stuff in 7 additional columns, but that would be whacky.  Imagine 7,287 employees in Table 'pebs_1' but only 6,814 in Table 'pebs_2'.  
It would take 2 weeks to 'combine' -- and by then, 150 of them would have changed.Review what is below and you will be able to see how we JOINED the 2 Tables.
Click 'Queries' on the YTree.  A list of Queries will show.
Click bs_1.  The Query Editor will begin to load.
Part 3 (Join Tables)
Once again, review A Diagram of Connections.
Note that Queries can appear to be quite imposing & for those that have never dealt with SQL, downright intimidating.  
The Younicycle Query Editor allows a Novice to use with a GUI, but also allows an Expert to directly type SQL.
Expressions give us the ability to write calculations.  Many of these should be familiar and are similar in functionality to Excel.  We make it as easy as possible and autmatically insert the Calculations inside of the Query.
Building a Datasource
Back
STEP 2
Notice the Tabs (Buttons) on the Left.  The current Tab is Dataset Design and is where you can graphically JOIN Tables.
Click the little Green rectangle in between the 2 Tables and you'll see that is where you set the Type of JOIN (not shown on Image).
Notice that ee_id is the 'key'.... the common element.
Time to Toot our own horn:
There is nothing like the Younicycle Query Editor in any SaaS on the Web.
It's the best.  No doubt about it.
STEP 3
We only have 1 person in this Query, so we sure don't need Where, Group by, Having or Order by Clauses.  We do encourage you to experiment!
The 'work' on this one is in the Expressions. See below.
Double click the one for 'ptw'.
After double-clicking 'ptw', you'll see the Expression Editor.  This is not dissimilar from Filemaker, Access, Excel, etc.
You can create some very powerful Expression in this Editor.
Now click the SQL Tab. Whoa - where'd that all come from?
It was all automatically generated by clicking and typing in Expressions.  
Even an Expert would hate to type all that stuff!  You see - if 1 comma is wrong - the Editor would complain.  The autogeneration of SQL is a big time saver - and anyone can learn.
Now - Click the Tab for Test Query - and then Click 'Refresh'.  
There it is.  You're on a roll.
If you are a Person that enjoys Learning new skills, the SQL Editor is a Tool you'll love.
You DO learn for a simple reason: It gives you Feedback.  You can see the results of your SQL 'Questions'.
The Editor also includes the ability to Update by Query and Delete by Query.  
So -- tinker -- and learn.