CASE WHEN ({systemnotes.date} BETWEEN 01/01/2016 A...
# general
n
CASE WHEN ({systemnotes.date} BETWEEN 01/01/2016 AND 01/31/2016 AND ({systemnotes.newvalue} = 'Pending Billing' OR {systemnotes.newvalue} = 'Pending Billing/Partially Fulfilled') THEN {tranid} END