sql and sample request