1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

mysql help

Discussion in 'MySQL' started by Mariam, Aug 18, 2009.

  1. Mariam

    Mariam New Member

    Suppose I have a table
     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
    Last edited by a moderator: Aug 19, 2009
  2. asha

    asha New Member

    What result do you get from your query?

Share This Page