nadeenibrahim
8/14/2018 - 3:23 PM

[Aaron/Chethan/Haslem] Headcount updates

select created_at 
	, json_extract_path_text(data, 'prev_job_attributes', 'total_openings') as old_head_count
	, json_extract_path_text(data, 'job_attributes', 'total_openings') as new_head_count
	, data
from activities 
where type = 'PositionUpdated' 
and old_head_count <> new_head_count
and new_head_count <> ''
order by created_at desc