I was wondering if there is some kind of virtual view functionality in DataGrip. I have not found anything by searching the web and also asking colleagues with more experience in using it have no answer on that.
I currently have the problem that I have to work with an Oracle Database where I have only read access to some views which just represents the quite complicated and not well named database schema.
I wanted to create some views which help me to understand the data, but as I am not allowed to create views I am working mostly with "WITH... " statements, which is quite a pain when I want to query different things on such "views" at the end.
What I would be looking for is something like
var my_view = "SELECT * FROM ..."
SELECT * FROM my_view WHERE <condition1>
Select * from my_view WHERE <condition2>
Mainly it is about storing a SQL statement in a variable which I can use in multiple SQL Statements later on.