SQL functionality

in dev