in mysql, dont know how use function sum calculated values. could me please? in code below, latest part. thing want add row @ end, summarizing "calculado" column thank in advance select p.id_order ref, concat (di.firstname,' ',di.lastname) nombre, ca.weight peso, if (ca.weight<1,(1), if (ca.weight>=1 , (ca.weight<3),(2), if (ca.weight>=3 , (ca.weight<5),(3), if (ca.weight>=5 , (ca.weight<8),(4), if (ca.weight>=8 , (ca.weight<10),(5), if (ca.weight>=10 , (ca.weight<15),(6), if (ca.weight>=15 , (ca.weight<20),(7), if (ca.weight>=20,(ca.weight*(0.5)),'error' )))))))) calculado, p.invoice_date fecha ps_orders p left join ps_address di on (p.id_address_delivery = di.id_address) left join ps_order_carrier ca on (p.id_order = ca.id_order) date(p.invoice_date) >= concat(date_format(last_day(now...
Comments
Post a Comment