Good afternoon Lidia,
I don't work in CS, but PSQuery is pretty much the same in HCM...
The first thing I would recommend is checking the DISTINCT box (if it is available). In PSQuery, this is the equivalent of starting your SQL-statement with "SELECT DISTINCT". You'll find the check box in a funky place in PSQuery. It's in the pop-up window when you click on Properties. This is the same pop-up you use when entering the query name, description, folder, etc. Sometimes the check box will not be available (such as with a Unioned query), but for simple queries it usually is.
My other pro-tip is to avoid aggregates until you can get the query to return basic data as a single row per employee. Aggregating fields either from the Fields tab or with SQL operators in Expressions can do weird things to your data.
And if you find that you are getting multiple rows of data per employee, try deleting one field at a time until you find the one that causes multiple rows. Then, work on that field.
Hope that helps.
------------------------------
Scott Frey
Connected Campus CoP Member - Senior Data Analyst-HR Info Systems
University of Colorado System
------------------------------
Message from the HEUG Marketplace:------------------------------
Find, Review, and Engage with Higher Education-focused solution providers, products, and services using the
HEUG Marketplace.
------------------------------