Home > database >  No who can help me to solve it
No who can help me to solve it

Time:09-16

The SUM (the if ((date_format (DATE_ADD (TradeTime, interval 0 MONTH), '% Y - % m)!=left (b.B illPeriod, 7) or BusinessBillNo=' ') AND TravelType=1, OrderMoney, 0)) AS not into T amount,
The SUM (the if ((date_format (DATE_ADD (TradeTime, interval 1 MONTH), '% Y - % m)!=left (b.B illPeriod, 7) or BusinessBillNo=' ') AND TravelType=1, OrderMoney, 0)) AS not into the amount of T + 1,
The SUM (the if ((date_format (DATE_ADD (TradeTime, 2 MONTH interval), '% Y - % m)!=left (b.B illPeriod, 7) or BusinessBillNo=' ') AND TravelType=1, OrderMoney, 0)) AS not T plus 2 amount,
The SUM (the if ((date_format (DATE_ADD (TradeTime, 3 MONTH interval), '% Y - % m)!=left (b.B illPeriod, 7) or BusinessBillNo=' ') AND TravelType=1, OrderMoney, 0)) AS not into greater than T add 2 amount,

When the conditions meet the one, only show satisfy the condition that a list of data, the need to how to solve

CodePudding user response:

The case when

CodePudding user response:

Case the when XXX then yyy when 111 then the end of 222
  • Related