Quantcast
Channel: Apache Timeline
Viewing all articles
Browse latest Browse all 5648

Having condition for fields using functions supported?

$
0
0
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)

Viewing all articles
Browse latest Browse all 5648

Trending Articles