SQL Merge

Adding SQL to master