title: How filter and distinct keys in Redis
body: <p>I have a Redis database with the following structure</p>
  
  <p><a href="https://i.stack.imgur.com/akEGW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/akEGW.png" alt="Redis estructure"></a></p>
  
  <p>And, I want get in one query only the first level keys. I mean: <code>[EB, HY, LV, LW, MB, NV]</code>.</p>
  
  <p>I have thought in <code>keys *</code> which return every key in database. After that, I would loop over all them, split keys and count the appearances of each. But it requires code, and I want get the wished result in one line, if possible, of course. </p>
  
  <p>Someone know how to help me? Thanks a lot. </p>