def multipart_geoms_query(schema, table):
  """Returns sql query to check multipart geometries of a table.

  Args:
    schema: Name of the schema.
    table: Name of the table.

  Returns:
    String sql query.
  """
  return (
    'SELECT id, ST_NumGeometries(geom) '
    'FROM {}.{} '
    'WHERE ST_NumGeometries(geom) > 1 '
    'ORDER BY id'
  ).format(schema, table)