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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T20:39:57+00:00 2026-05-11T20:39:57+00:00

employees e_id first last 1 John Smith 2 Bob Smith 3 Alex Smith 4

  • 0

employees
e_id first last
1 John Smith
2 Bob Smith
3 Alex Smith
4 John Doe
5 Ron Doe

clockpunch
e_id    time    for adjustment
1   0650    in  early
3   0710    in  late
4   0725    in  early
1   1100    lunch   ---
2   1150    in  late
2   1400    lunch   ---
4   1320    out ---

I need a SINGLE query that will list all employee names, along with a count of how many times that user has been early, descending order by the count of times early. How would this be done ?

  • 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-11T20:39:58+00:00Added an answer on May 11, 2026 at 8:39 pm
        select a.first,a.last,sum(case b.adjustment when 'early' then 1 else 0 end) as ct 
    from employees a, clockpunch b where a.e_id=b.e_id
        group by a.first, a.last
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following XML data: <?xml version=1.0 encoding=iso-8859-1?> <results> <result> <MemberFirstName>JOHN</MemberFirstName> <MemberLastName>DOE</MemberLastName> <MemberLogin>1</MemberLogin>
I'm upgrading an app that registers the time employees arrive and leave the office.
When I run the program the first time (the output file is not yet
Consider the Oracle emp table. I'd like to get the employees with the top
Does Google force employees who have offers from Facebook to leave immediately?
I have class method that returns a list of employees that I can iterate
I'm trying to write a stored procedure to select employees who have birthdays that
I'm using this query to get all employees of {clients with name starting with
If I have a page with outputcaching (let's call it Employees.aspx) which accepts one
Reporting Services 2000 SP2 I've got a matrix displaying the number of employees Business1

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.