Reordering and standardization of the sql files

Signed-off-by: emanuele <emanuele45@gmail.com>