Go4Expert

Go4Expert (http://www.go4expert.com/)
-   MySQL (http://www.go4expert.com/forums/mysql-forum/)
-   -   mysql help (http://www.go4expert.com/forums/mysql-help-t19088/)

Mariam 18Aug2009 16:43

mysql help
 
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

asha 26Aug2009 10:50

Re: mysql help
 
What result do you get from your query?


All times are GMT +5.5. The time now is 12:36.