SQL for compa ratio
Need correct SQL to find Compa Ratio
I am writing a report for the business that includes the compa ratio as one of the columns. And the SQL I've written is correct......most of the time. There's a handful of people though that don't seem to have the right compa ratio listed in the database, even though the correct compa ratio is displayed in the UI. I thought I might show the community the SQL that I've written and see if there's anything different I should do.
This is basically what I've got:
SELECT asg.assignment_number, asg.assignment_status_type, sal.date_from, sal.date_to, sal.compa_ratio, pg.grade_code, rtv.minimum, rtv.maximum, rtv.mid_value, sal.salary_amount