Hi, everyone:
  Here is my query that finds the distinct value and counts them,  you can see that I used the same sub query twice, first for finding the distinct values, second for count the distinct values,  is there a way that I can cache the sub query result and reuse it somewhere else? I think it will run faster in that way.