sql queries reformatted

Change-Id: I67493f7d832bd4c4bcb165a89f09f8b6140e0dde