Hi everyone I didn't find any maillist regarding SQL question so I'm posting my question in here.
I have a table like this [ ID ][ Total ] [ 1 ][ 20 ] [ 2 ][ 30 ] [ 3 ][ 40 ] [ 4 ][ 10 ] [ 5 ][ 20 ] [ 6 ][ 20 ] I want to run SQL query that will return to me the first records that the SUM of Total field = 100 for example SELECT * FROM tbl_name WHERE SUM(Total)=100 ORDER BY ID I know my SQL statment above will not work, could someone help me ? -- Ahmad Fahad AlTwaijiry