SQL functionality

Alpha