wrangled queries into sql/