I have a table with the following structure
key1 varchar(255)
key2 varchar(255)
value decimal(6,2)
now i want to retrieve all tuples grouped on one of the keys where the value doesnt add up to a constant value say 1000.00.
Any idea how I can get this done using SQL?
SAmple data
key1 key2 value
1 2 480
1 3 520
2 3 200
2 4 300
2 5 400
In this case my query should return the last 3 rows.
1 Answer