Why is SQL not eliminating dublicate rows automatically

In practice, there are many situations where it is necessary to get the values as many times as they appear in the column. Consider a table that contains employee data. Let it have the column Salary. We want to compute the total amount of money needed for monthly salaries. If we use the project operation of the relational algebra to get the salaries, we get a certain salary, say 2000 euros, only once even if many employees have this salary. Computing the total over the received values gives too small an amount.


This could be illustrated with an image