Refactor /sql

Signed-off-by: Simon <patrick.simon@hhu.de>