Added separate function for determining of columns for join tables and function that includes "LIMIT" and "OFFSET" expressions