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 9060371
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T15:12:45+00:00 2026-06-16T15:12:45+00:00

I have a table that has the following fields: 1- Name 2- Dept 3-

  • 0

I have a table that has the following fields:

1- Name

2- Dept

3- DateWorked

5- Session

the table filled with data about people from different departments that worked on different date and different sessions (AM/PM). I want to count the number of sessions that all people in a specific dept worked. Please note that:

1- Several people work on a department.

2- Each person may work several sessions. (on different date)

3- I want to know thw number of session that any persion of a department worked. for example, it doesn’t matter if on say 28/12/2012 AM, two person from sale department worked, It should be counted as one.

I maybe able to write access VBA code to do this, but I prefer a sql query to do this.

Can you please give me a clue how I can do this?

I am using Access 2003.

  • 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-16T15:12:47+00:00Added an answer on June 16, 2026 at 3:12 pm
    select t1.Dept, count(*) from
    (
        select distinct Dept, DateWorked, Session from t
    ) AS t1
    group by t1.Dept;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a table that has multiple rows with the following fields: PersonName SongName
I have a table name Discount that has the following schema: PK DiscountID int
I have a payments table that has the following structure. **Payments** id name created_by
I have a users table that has the following fields: userid, phone, and address
i have a table that has following column Type -------- type 1 type 2
I have a MSSQL table stores that has the following columns in a table:
I have a SQL database that has the following table: Table: PhoneRecords -------------- ID(identity
I have one table that has two fields - ID1 and ID2 ID1 can
I have a lookup table that has a Name and an ID in it.
i have table AuditLog with fields including: audited_id | audited_type That results in data

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.