Results 1 to 7 of 7

Thread: To find Maximum Salary

  1. #1
    Junior Member
    Join Date
    Apr 2008
    Answers
    5

    To find Maximum Salary

    To find Maximum salary from 5 tables

    ex: I having five tables 1.emp 2.dept 3.account 4.balance 5.sample


    I want to get maximum salary from 5 tables ?


  2. #2
    Junior Member
    Join Date
    Apr 2008
    Answers
    5

    Re: To find Maximum Salary

    [QUOTE=S.Ravi;28933]To find Maximum salary from 5 tables

    ex: I having five tables 1.emp 2.dept 3.account 4.balance 5.sample


    I want to get maximum salary from 5 tables ?


  3. #3
    Junior Member
    Join Date
    Apr 2008
    Answers
    1

    Re: To find Maximum Salary

    Quote Originally Posted by S.Ravi View Post
    To find Maximum salary from 5 tables

    ex: I having five tables 1.emp 2.dept 3.account 4.balance 5.sample


    I want to get maximum salary from 5 tables ?
    hey dear,

    Create the join of al five tables by using JOIN clause and then using SELECT MAX(sal) function extract the max salary from the joined table.

    if u need exact code for that let me know


  4. #4
    Moderator
    Join Date
    Jun 2007
    Answers
    2,074

    Re: To find Maximum Salary

    Kindly post the query that you are working on.


  5. #5
    Junior Member
    Join Date
    Apr 2008
    Answers
    5

    Re: To find Maximum Salary

    Quote Originally Posted by ashiexp View Post
    hey dear,

    Create the join of al five tables by using JOIN clause and then using SELECT MAX(sal) function extract the max salary from the joined table.

    if u need exact code for that let me know
    Yes, I need code for that, plz reply me


  6. #6
    Contributing Member
    Join Date
    Sep 2005
    Answers
    91

    Re: To find Maximum Salary

    It shoud work with little tweaking or no changes ..
    select max(salary) as salary from table1
    union all
    select max(salary) as salary from table2
    union all
    select max(salary) as salary from table3
    group by salary

    Let me know if this works..


  7. #7
    Expert Member
    Join Date
    Sep 2007
    Answers
    697

    Re: To find Maximum Salary

    Quote Originally Posted by S.Ravi View Post
    To find Maximum salary from 5 tables

    ex: I having five tables 1.emp 2.dept 3.account 4.balance 5.sample


    I want to get maximum salary from 5 tables ?
    Dear Ravi,


    How can members post query without knowing structure of your tables? Post the structure of your tables or query you tried so far?

    Regards
    Krishna


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact