adding some sql queries