9 Replies Latest reply: Jun 21, 2016 5:10 PM by Sunny Talwar RSS

    average vs single value

      Hi, i want to compare database single values (amount) with the average value of every shop and if the value is lower i want to obtain the id_moviment, but a line like this doesn't work,


      if(amount < avg(aggr (amount, shop_id_movimento)), id_moviment)