fixed sql edges query to include edge weight