Can I specify 'greater than' with db_delete()? I am new to Drupal 8. 
I can use the following code to delete a record where salary == 45

$salary = 45;
$num_deleted = db_delete('test_table')
  -&gt;condition('salary', $salary)
  -&gt;execute();


Is it possible to specify a condition like "salary >= $salary" with db_delete() or I should use db_query()?
You can see document Conditional clauses for 7 (need update document) or you can see the documentation for QueryInterface, in particular for QueryInterface::condition(). 


  @param $operator  Possible values: - '=', '&lt;>', '>', '>=', '&lt;', '&lt;=', 
  
  
  'STARTS_WITH', 'CONTAINS', 
  'ENDS_WITH': These operators expect $value to be a literal of the same type as the column.
  'IN', 'NOT IN': These operators expect $value to be an array of literals of the same type as the column.
  'BETWEEN': This operator expects $value to be an array of two literals  of the same type as the column.
  


. In your case you can use:

$salary = 45;
$num_deleted = db_delete('test_table')
  -&gt;condition('salary', $salary, '&gt;=')
  -&gt;execute();