title: Select JSON object that appears more than one time
body: <p>I am trying to write a query to return all trains that have more than one <code>etapesSupervision</code>.</p>
  
  <p>My table has a column called <code>DETAIL</code>, in this column I can find the JSON of my train. </p>
  
  <pre><code>"nomTrain": "EVOL99",
  "compositionCourtLong": "LONG",
  
  "sillons": [{
  
      "numeroTrain": "EVOL99"
  }],
  "sillonsV4": [{
  "refSillon": "sillons/4289505/2"
  }],
  "branchesStif": [{
      "data": "49",
      "data": "BP",
      "data": "ORIGINE"
  } ],
  "etapesSupervision": [{
      "data": "PR/0087-758896-00",
      "data": "PR/0087-758607-BV",
      "superviseur": "1287",
      "uoSuperviseur": "B"
  },
  {
      "data": "PR/0087-758607-BV",
      "data": "PR/0087-001479-BV",
      "superviseur": "1287",
      "uoSuperviseur": "B"
  }],
  </code></pre>
  
  <p>This is the query I wrote : </p>
  
  <pre><code>    select * from course where CODE_LIGNE_COMMERCIALE='B'
       --and ref = 'train/2018-11-12'
      and  instr(count(train.detail,'"etapesSupervision":'))&gt; 1 ;
  </code></pre>
  
  <p>Using this, I return trains with only one <code>etapesSupervision</code>.</p>
  
  <p>The thing is the column <code>DETAIL</code> is JSON, so I feel like I can't do a lot with it.</p>
  
  <p>I tried also with <code>like</code>, but it doesn't work either.</p>