Suppose I have a table Code: ID userName fyears tyears 1 nika 2007 2009 2 nika 2005 2009 3 nika 2000 2005 4 nika 1999 2000 5 nika 1996 1998 fyears is when the user nika started to work, tyears-ended I need to select the total work experience, now it is =12 SELECT sum(tyears-fyears) FROM WE I did in this way but it works inappropriately