Correct the sql statement to list registered In-Out