SUPPORT-8925 fix query
This commit is contained in:
parent
a8f074aa5e
commit
d78c8f0a23
1 changed files with 3 additions and 3 deletions
|
|
@ -531,10 +531,10 @@ gender_and_recruitment_data AS (
|
|||
ROUND(COUNT(r.id) FILTER (WHERE COALESCE(children_under_18, 0) = 3) * 100.0 / NULLIF(COUNT(r.id), 0), 2) AS three_children_percent,
|
||||
ROUND(COUNT(r.id) FILTER (WHERE COALESCE(children_under_18, 0) >= 4) * 100.0 / NULLIF(COUNT(r.id), 0), 2) AS four_or_more_children_percent
|
||||
FROM
|
||||
public.recruits r
|
||||
LEFT JOIN children_count cc
|
||||
children_count сс
|
||||
JOIN public.recruits r
|
||||
ON r.id = cc.recruit_id
|
||||
WHERE r.vu_current_info->>'isMilitaryRegistered' = 'true'
|
||||
AND r.vu_current_info->>'isMilitaryRegistered' = 'true'
|
||||
AND r.current_recruitment_id IS NOT NULL
|
||||
GROUP BY
|
||||
r.gender,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue