Feature/separate sql