fix sql request