Q:

Find minimum non repeating sequence using oracle sql

Consider a sequence consisting of letters a,g,c,t. You have to find the minimum non-repeating sequence of characters and their length.Also note the non-repeating character should be in sequence.
For example in the sequence 'aaggcct' the answer is minimum non-repeating character is t where t is the least non-repeating set of character and length is 1.Even though aa,gg,cc,ag,gc,ct is non repeating since t is least non repeating with length 1 the answer is t.
When I say t is non-repeating then there is no other t in the sequence.
For the sequence 'aaggcctt' one of the answer is aa, for example, is the least non-repeating set of characters.Even though aag is non-repeating the least non-repeating length is 2 hence it is not considered.
When I say 'aa' is non-repeating there is no other aa in the sequence.
The complete answer is below
    DATA    LENGTH
    ag       2
    gg       2
    ct       2
    cc       2
    aa       2
    tt       2
    gc       2

One more example for the sequence 'aaagggcccttt' here aa is repeated hence not in the answer. When I say 'aa' is repeated because in 'aaa' there are two 'aa' staring from position 1 aa and then position 2 aa 
    DATA    LENGTH
    ag       2
    ct       2
    gc       2

A:

Find all the substrings of a string, then count them to see how many of them repeat and exclude any that not unique and then find the set of substrings that have the minimum length for each string:
So, if you have the test data:
CREATE TABLE test_data ( id, value ) AS
  SELECT 1, 'agaga' FROM DUAL UNION ALL
  SELECT 2, 'aaggcct' FROM DUAL UNION ALL
  SELECT 3, 'aaggcctt' FROM DUAL UNION ALL
  SELECT 4, 'aaagggcccttt' FROM DUAL;

Then you can use:
WITH substrings ( id, value, length, pos ) AS (
  SELECT id,
         value,
         LENGTH( value ),
         1
  FROM   test_data
UNION ALL
  SELECT id,
         value,
         CASE pos
         WHEN 1
         THEN length - 1
         ELSE length
         END,
         CASE pos
         WHEN 1
         THEN LENGTH(value) - (length-2)
         ELSE pos-1
         END
  FROM   substrings
  WHERE  length > 1
  OR     pos > 1
),
non_repeats ( id, value, substring ) AS (
  SELECT id,
         MIN( value ),
         SUBSTR( value, pos, length )
  FROM   substrings s
  GROUP BY id, SUBSTR( value, pos, length )
  HAVING COUNT(*) = 1
)
SELECT id,
       value,
       substring
FROM   (
  SELECT id,
         value,
         substring,
         RANK() OVER ( PARTITION BY id ORDER BY LENGTH( substring ) ASC ) AS rnk
  FROM   non_repeats
)
WHERE  rnk = 1;

Which outputs:

ID | VALUE        | SUBSTRING
-: | :----------- | :--------
 1 | agaga        | gag      
 2 | aaggcct      | t        
 3 | aaggcctt     | gc       
 3 | aaggcctt     | cc       
 3 | aaggcctt     | ct       
 3 | aaggcctt     | ag       
 3 | aaggcctt     | aa       
 3 | aaggcctt     | tt       
 3 | aaggcctt     | gg       
 4 | aaagggcccttt | ct       
 4 | aaagggcccttt | gc       
 4 | aaagggcccttt | ag       

db<>fiddle here

