JohnandSwifty
Technical User
Hi,
I need to replicate the CASE statement below in a QofQ. Any ideas?
I need to replicate the CASE statement below in a QofQ. Any ideas?
Code:
CASE
WHEN quotationProduct.sequence > 0 AND quotationProduct.sequence <= 5 THEN '1-5'
WHEN quotationProduct.sequence > 5 AND quotationProduct.sequence <= 10 THEN '6-10'
WHEN quotationProduct.sequence > 10 AND quotationProduct.sequence <= 15 THEN '11-15'
WHEN quotationProduct.sequence > 15 AND quotationProduct.sequence <= 20 THEN '16-20'
WHEN quotationProduct.sequence > 20 AND quotationProduct.sequence <= 25 THEN '21-25'
WHEN quotationProduct.sequence > 25 AND quotationProduct.sequence <= 30 THEN '26-30'
WHEN quotationProduct.sequence > 30 AND quotationProduct.sequence <= 35 THEN '31-35'
WHEN quotationProduct.sequence > 35 AND quotationProduct.sequence <= 40 THEN '36-40'
WHEN quotationProduct.sequence > 40 AND quotationProduct.sequence <= 45 THEN '41-45'
WHEN quotationProduct.sequence > 45 AND quotationProduct.sequence <= 50 THEN '46-50'
WHEN quotationProduct.sequence > 50 AND quotationProduct.sequence <= 55 THEN '51-55'
WHEN quotationProduct.sequence > 55 AND quotationProduct.sequence <= 60 THEN '56-60'
WHEN quotationProduct.sequence > 60 AND quotationProduct.sequence <= 65 THEN '61-65'
WHEN quotationProduct.sequence > 65 AND quotationProduct.sequence <= 70 THEN '66-70'
WHEN quotationProduct.sequence > 70 AND quotationProduct.sequence <= 75 THEN '71-75'
ELSE '75+'
END AS sequenceGroup