sajad torkamani

Open query console:

Datagrip: How to add a routine

Write procedure:

Datagrip: How to add a routine

Execute the file and it should now appear as a new routine under the routines folder.