BIP – Query to find element entry counts
SELECT pett.element_name, count(peef.element_type_id)
FROM pay_element_types_tl pett
,pay_element_entries_f peef
WHERE pett.element_type_id = peef.element_type_id
AND pett.language = 'US'
AND to_date('01-04-2022','DD/MM/RRRR') BETWEEN peef.effective_start_date AND peef.effective_end_date
GROUP BY pett.element_name