Adding some sql helpers.