Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9017161
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T04:11:44+00:00 2026-06-16T04:11:44+00:00

i have these two tables, employeeid | firstname | lastname | address | pan

  • 0

i have these two tables,

 employeeid | firstname  | lastname |   address   | pan  |  joindate  | lastupdatedate | annualincome | taxrate | currentgrade 
------------+------------+----------+-------------+------+------------+----------------+--------------+---------+--------------
          1 | tushar     | mishra   | bommanhalli | ab7c | 2012-10-15 |                |       300000 |    0.05 |            2
          2 | puneet     | purohit  | j.p         | ab5c | 2012-10-15 |                |       300000 |    0.05 |            2
          3 | vishwanath | b.s      | btm         | ab6c | 2012-10-15 |                |       300000 |    0.05 |            1
          4 | xavier     | d'souza  | btm         | ab8c | 2012-10-15 |                |       300000 |    0.05 |            1
          5 | deepak     | kumar    | hebbal      |      | 2012-10-15 |                |       300000 |    0.05 |            1

and other one..

employeeid | salarydate | income | tax  
------------+------------+--------+------
          2 | 2012-11-01 |  25000 | 1250
          3 | 2012-11-01 |  25000 | 1250
          4 | 2012-11-01 |  25000 | 1250
          5 | 2012-11-01 |  25000 | 1250
          2 | 2012-12-01 |  25000 | 1250
          3 | 2012-12-01 |  25000 | 1250
          4 | 2012-12-01 |  25000 | 1250
          5 | 2012-12-01 |  25000 | 1250
          2 | 2013-01-01 |  25000 | 1250
          3 | 2013-01-01 |  25000 | 1250
          4 | 2013-01-01 |  25000 | 1250
          5 | 2013-01-01 |  25000 | 1250
          1 | 2012-11-01 |  25000 | 1500
          1 | 2012-12-01 |  25000 | 1500
          1 | 2013-01-01 |  25000 | 1500

here the tax column in second table is for a month .i want to fetch the name of the employee who had paid highest tax last year. here employee id in second table is referenced to the employeid in 1st table.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T04:11:46+00:00Added an answer on June 16, 2026 at 4:11 am

    Use this code.

    select salary.employeeid,firstname,lastname, sum(tax) 
     from salary
    left join employee 
       on salary.employeeid=employee.employeeid
    group by salary.employeeid,firstname,lastname
    order by sum(tax) DESC LIMIT 1
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two tables: employee with fields employee_id, firstname, middlename, lastname timecard with fields
I have these two tables Orders and Employees Orders Table OrderID EmployeeID 1 1
I have two tables.. Persons: empid(primary key) firstname lastname email Details: Did(primary key) salary
I have these two tables people ============ id, name and answer_sheets ============ id, person_id,
If I have these two tables: <table> <tr> <td>Small Length Content</td> </tr> </table> <table>
Hi, I have these two tables: users and friends (friend_status = 1 means the
Hi, I have these two tables: users and friends (friend_status = 1 means the
This is SQL Server 2008. I have these two tables and a join: DECLARE
I have two tables with a single common field. Here is how these two
We have two tables Family and Member, the relation between these two is Family

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.