SQL query to get rows by comparing data in different columns

So here is what you want

select * from tbl
where count1 - count2 <= 10

Leave a Comment