title: Multiple Selection in Datagrip (Running a CTE that's not in your nested query)
body: <p>I'm looking for a way to run a nested correlated query that requires a CTE created above the script. For example if I had:</p>
  
  <pre><code>with first_cte as (
    select * 
    from a_table 
    where 1=1
  )
  
  select * from 
    (select 
      column_1,
      column_2,
      column_3
    from b_table b
      inner join first_cte f on f.user_id = b.user_id
      where 1=1) x
  </code></pre>
  
  <p>If I just wanted to test the nested query, it will say that first_cte doesn't exist. Is there a way to highlight the CTE so that it will run when I'm testing nested queries?</p>
  
  <p>I'm using PostgreSQL btw. Thanks!!!</p>