Add SQL for lwss query