text: -- 消费记录
  
  SELECT COUNT FROM sms_01.SSC_CONSUME_RECORD;
      
  SELECT 
  	C.RECID,T.RECID,HEX(TENANT),T.NAME, C.CREATETIME, SUM(COUNT), SUM(AMOUNT)
  FROM
  	sms_01.SSC_CONSUME_RECORD AS C LEFT JOIN  sms_01.SSC_TENANT T ON T.RECID = C.TENANT
  GROUP BY CREATETIME , TENANT
  ORDER BY CREATETIME DESC;
  
  -- 租户
  
  SELECT * FROM sms_01.SSC_TENANT;
  
  -- 短信
  
  DESC SMS_01.SSC_SMS_RECEIVE;
  
  SELECT * FROM SMS_01.SSC_SMS_RECEIVE  R LEFT JOIN sms_01.SSC_TENANT T ON T.RECID = R.TENANT WHERE  T.NAME="云南大学" AND DATE_FORMAT(R.SENDTIME,'%Y-%m-%d') = "2018-11-13"  ORDER BY SENDTIME DESC;
  
  USE SMS_01;
  
  -- 消费记录
  
  DESC SMS_01.SSC_TRADE_RECORD;
  
  SELECT T.NAME,R.AMOUNT FROM SMS_01.SSC_TRADE_RECORD R LEFT JOIN sms_01.SSC_TENANT T ON T.RECID = R.TENANT WHERE  T.NAME="云南大学" AND TRADEDES LIKE '%日常账单' AND DATE_FORMAT(R.CREATETIME,'%Y-%m-%d') = "2018-11-14" ORDER BY  R.CREATETIME DESC ;
  
  SELECT * FROM SMS_01.SSC_TRADE_RECORD  WHERE TRADEDES LIKE '%日常账单' AND DATE_FORMAT(CREATETIME,'%k') != "0" ORDER BY  CREATETIME DESC limit 100000;
  
  SELECT DATE_FORMATE(CREATETIME,'%Y-%M-D') FROM SMS_01.SSC_TRADE_RECORD;
  
      