Is there anyway to implement a having condition for a field using a function? Such as below using SUM function?:

SELECT
    te.time_entry_id, te.quantity_produced, sum(te2.quantity_produced)
FROM
    time_entry te left outer join
time_entry_assoc tea on te.time_entry_id = tea.time_entry_id_to left outer join
    time_entry te2 on tea.time_entry_id = te2.time_entry_id
GROUP BY
     te.time_entry_id
HAVING
    te.quantity_produced = sum(te2.quantity_produced)

Reply via email to