Added SQL for all queries