Change over everything to SQL
Change over everything to SQL part 2