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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T10:43:51+00:00 2026-05-21T10:43:51+00:00

I have four tables: task – have a batch_id and estimates of how long

  • 0

I have four tables:

  1. task – have a batch_id and estimates of how long a task would take to complete
  2. batches – groups of tasks
  3. batch_log – entries showing the time worked for each task with a userid for who worked it.
  4. operation – type of machine the batch is run on, paint, silkscreen, etc.

How would I get each batch worked for each user, the total elapsed from each batch log for those batch ids and the total estimate from each task id for that batch?

EDIT:

TABLES:

task
id     estimated_nonrecurring   estimated_recurring  batch_id

batch
id     operation_id date_entered

batch_log
id     userid    batch_id   time_elapsed

operation
id     name

I’m thinking:

get each user;
get a list of distinct batch_ids that they worked on;
get a sum of all the time_elapsed from each batch_log for those batch id;
get all the non_recurring and the recurring for each task with each batch_id;

so that the result is like

userid, operation, batch_id, total_elapsed, total_estimate, date_entered

The reasoning for doing this is so that it can be possible to rate the users on how productive they are and use these queries in excel. I think I may have to go with two queries:

  1. the batch log
  2. a query to get the total estimated for each batch
  • 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-21T10:43:51+00:00Added an answer on May 21, 2026 at 10:43 am

    Something like:

    SELECT bl.UserId, b.name, t.estimate
    FROM batch_log as bl
    JOIN batches as b
        ON b.id = bl.batch_id
    JOIN task as t
        ON t.id = b.task_id
    WHERE bl.UserId = 123
    

    Hard to say without any sort of table structure to go by.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have four tables, Shops Sales Batches Products and I would like to extract
Here is where I am at right now. I have four tables: task, project,
I have four tables: groups, users, votes, follows. The structures of these tables are
I have four groups of tables: Group A : tables which are queried only
I have four tables containing exactly the same columns, and want to create a
I have four tables: Users PrivilegeGroups rdPrivileges LinkPrivilege ----------- ---------------- --------------- --------------- userId(pk) privilegeGroupId(pk)
Let's say I have four tables: PAGE , USER , TAG , and PAGE-TAG
I have a secondhand sale car database and four tables with relationships. Same column
I have four tables in my database and i want to join that's and
I have four tables TableA: id1 id2 id3 value TableB: id1 desc TableC: id2

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.