Skip to content

Commit

Permalink
Add column year of the data and fix missing information on value_chec…
Browse files Browse the repository at this point in the history
…ked column for VOMS and Vins Checks

[#3483]
  • Loading branch information
erikamov committed Oct 15, 2024
1 parent 28caf9d commit 1e5472f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ vins_a30 as (
GROUP BY organization, fiscal_year
)

select voms_rr20.*, vins_a30.a30_vin_n
SELECT COALESCE(voms_rr20.organization, vins_a30.organization) as organization,
COALESCE(voms_rr20.fiscal_year, vins_a30.fiscal_year) as fiscal_year,
voms_rr20.rr20_voms,
vins_a30.a30_vin_n
FROM voms_rr20
FULL OUTER JOIN vins_a30
ON voms_rr20.organization = vins_a30.organization
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@
WITH rr20f_180 as (
SELECT organization,
"RR20F-180: VOMS across forms" as name_of_check,
fiscal_year as year_of_data,
CASE WHEN ROUND(rr20_voms, 1) > ROUND(a30_vin_n, 1)
THEN "Fail"
ELSE "Pass"
END as check_status,
CONCAT("RR-20 VOMS = ", CAST(ROUND(rr20_voms, 1) AS STRING),
"# A-30 VINs = ", CAST(ROUND(a30_vin_n, 1) AS STRING)) AS value_checked,
CONCAT("RR-20 VOMS = ", IF(rr20_voms IS NULL, ' ', CAST(ROUND(rr20_voms, 1) AS STRING)),
", A-30 VINs = ", IF(a30_vin_n IS NULL, ' ', CAST(ROUND(a30_vin_n, 1) AS STRING))
) AS value_checked,
CASE WHEN ROUND(rr20_voms, 1) > ROUND(a30_vin_n, 1)
THEN "Total VOMS is greater than total A-30 vehicles reported. Please clarify."
ELSE "VOMS & A-30 vehicles reported are equal to and/or lower than active inventory."
Expand Down

0 comments on commit 1e5472f

Please sign in to comment.