Here is example of one security level definition.
We will be using this simple query
This query is very inefficient, but will provide with examples how to use JOIN or variables
We will be applying our restriction to column L_PARTITION
From the last table where we applied our security level, logged user will get only rows where Partition value is 1 (orange colour)