Sql Solve Problems With Ratios