correct sql statements
final branch