Does anyone on the forum have a good knowledge of the IQ retail and accounts software?

I need some assistance with writing an SQL command to update stock order levels and parameters.
I do not have an SUA with IQ, so can't get the help from them, and my freelance IQ agent is "too busy" to help a small customer.

I am trying to update my stock table, with an order level and order quantity based on a calculation of stock sold between 2 dates with a math function applied to this to give the results

This is what I came up with initially that did not work - based on units sold year to date

update Stock
set MIN_LVL=UnitsYearToDate/5 (I would prefer a specific date range here)
set ORD_QUANT=UnitsYearToDate/5*3
where (only using one of these) REGULAR_SU='800xxx' or SUBDEPARTM='xxxx' or CODE between 'xxxx' and 'xxxx'

Any pointers would be greatly appreciated.
TIA