anchor.diff:                  "AND def.tenant_id != '%s' AND def.tenant_id IN (%s)" \
                   % (admin_id, limited_in_list)
   
  -        vsql(delete_sql % (retain_time, limit_clause))
  +        vsql(delete_sql % (time_clause, limit_clause))
   
       elif args.ignore:
   
  
positive.code:          where
      """
  
      key_val_dict = dict(s.split('=') for s in dimensions)
      first_time = True
      for key, value in key_val_dict.iteritems():
          if not first_time:
              sql += " or "
          sql += " name = '%s' and value = '%s'" % (key, value)
          first_time = False
  
      sql += """
         group by
            dimension_set_id
         having
            count(*) = %d
         order by
           dimension_set_id)
      """ % len(key_val_dict)
  
      return sql
  
  
  
negative.code:     help_text = """
      Number of days of measurements to retain.
      """
      date_group.add_argument('-r', '--retain_days', required=False,
                              help=help_text)
  
      help_text = """
      Start time of the pruning period.
      """
      date_group.add_argument('-s', '--start_time', required=False,
                               help=help_text)
  
      help_text = """
      End time of the pruning period.
      """
      parser.add_argument('-e', '--end_time', required=False,
                          help=help_text)
  
      help_text = """
      Metric name(s) separated by spaces to delete, only works with
      -l (limit) argument.  As in '-m mem.total_mb cpu.idle_perc'.
      """
      parser.add_argument('-m', '--metric_name', required=False,
                          nargs='+', help=help_text)
  
      help_text = """
      Dimension key/value pairs to delete, only works with -m (name)
      argument.  Syntax is the same as the monasca command:
      -d 'region=dev02,hostname=dev02-keystone-001'
      """
      parser.add_argument('-d', '--dimensions', required=False,
                          help=help_text)
  
      args = parser.parse_args()
  
      if args.limit and args.admin_tenant in args.limit:
          print "Error: Pruning the admin project is not allowed!"
          sys.exit(1)
  
      if args.start_time and not args.end_time:
          print "Error: Please provide both start and end time."
          sys.exit(1)
  
      if args.start_time and args.end_time and not args.start_time < args.end_time:
          print "Error: Start time must preceed end time."
          sys.exit(1)
  
      if args.dimensions and not args.metric_name:
          print "Error: Please provide metric name with dimensions."
          sys.exit(1)
  
      before_counts = get_table_counts(MON_TABLES)
  