Updated SQL interface