SQL to display pending orders table