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

  • SEARCH
  • Home
  • 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 7551653
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T10:33:06+00:00 2026-05-30T10:33:06+00:00

Hi i need help with a query I have a table Where Jobs and

  • 0

Hi i need help with a query

I have a table Where Jobs and Employee are linked its called EmployeeToJobsApplied

Id    EmployeeId       JobsId      Applied     Viewed
 1         1             1            True      True
 2         1             2            False     True
 3         1             1            True      True
 4         1             3            True      True

If you noticed there are repeating values like in ID=3

I didn’t create the database structure. I can’t do much about the table structure as of this point since this is a post production project.

The thing i can change is the StoredProcedure that could retrieve information from this table.

So what i need is a single column sigle row value of the Total of Jobs Applied

So basically what i need based on this example is to get a value of

2 Jobs Applied for Employee ID = 1

i want to ignore the duplicates.

Thank You!

Please feel free to edit/retag

UPDATE
I do need the total of the result,
I need the total count (not the list) of Employees who applied for a specific job.
I tried using count and i’ts not working accordingly, Because it counts also those who are not distinct. Thank you for your kind help

  • 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-05-30T10:33:08+00:00Added an answer on May 30, 2026 at 10:33 am

    If you need to aggregate on distinct values, then you can write:

    select EmployeeId, count(distinct JobsId) as JobsApplied
    from EmployeeToJobsApplied
    where Applied = 1
    group by EmployeeId
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i need some help with a sql query. I have a table called 'table1'
I need help with an advanced SQL-query (MSSQL 2000). I have a table called
I need help with an advanced SQL-query (MSSQL 2000). I have a table called
need help/guide for sql select query, I have 2 table stock and stock_history, in
I need a little help brainstorming on a query. I have a sales table
I need some help building an Query. I have a table Orders with 3
I need some help with a query. I have this simple table: CREATE TABLE
I need help with a SQL Query I have this table likes friend friend2
I need some help to build SQL Query. I have table having data like:
I need some help to build SQL Query. I have table having data like:

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.