notebook to make database queries