ahmedrahil786

Key Index Dashboard - Others

Apr 23rd, 2019
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. set @startDate = "2019-04-15 00:00:00";
  2.  
  3. select
  4. sum(c.amount) as amount
  5. from charges c
  6. where convert_tz(c.created_at, '+0:00','+8:00') >= @startdate
  7. and convert_tz(c.created_at, '+0:00','+8:00') <= date_add(@startdate, interval 7 day)
  8. and c.state = 'normal'
  9. and c.kind not in ('rent','d2d','oneway','mileage','subscriptionFee')
  10. #group by c.kind
  11. ;
Advertisement
Add Comment
Please, Sign In to add comment