SELECT
  *
FROM
  table_name
WHERE
  name = 'test' AND num > 7 AND last_name LIKE '%''test''%';
