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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T14:30:28+00:00 2026-06-18T14:30:28+00:00

I’m not really sure how to describe this problem without an example, so here’s

  • 0

I’m not really sure how to describe this problem without an example, so here’s an example:

I have three tables:

Table 1: Boxes

BoxID | Box Name | Box Cost
1 | Bob's Box | $20
2 | Matt's Box | $21
3 | Jacob's Box | $22
4 | Beth's Box | $23
5 | Rachel's Box | $24

Table 2: Box_ProcessIDs

BoxID | ParentProcessID
1 | 123
2 | 456
3 | 789
4 | 012
5 | 234

Table 3: Box_Processes

ParentProcess | ChildProcess | Start Time | End Time | ProcessName 
123 | AAA | 1:00 | 1:05 | Invoiced
123 | AAB | 1:30 | 1:35 | Packed
123 | BBB | 2:00 | 2:05 | Shipped

456 | CDD | 3:15 | 3:20 | Invoiced
456 | DDD | 3:25 | 3:30 | Packaging_Complete
456 | CCD | 3:35 | 3:40 | Shipped

789 | EEE | 4:15 | 4:20 | Invoiced
789 | EEF | 4:25 | 4:30 | Done_Packing
789 | EFF | 4:35 | 4:40 | Shipped

I want the output columns to be:
Box Name, Box Cost, Box Shipping Duration, Box Packing Duration, Box Invoice Duration

I know I can use like %pack% to select my packing fields, and I can figure out how to use Date_Part or somesuch to get my durations, but I’m at a loss as to how to get my shipping duration, packing duration, and invoice duration into separate fields.

  • 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-18T14:30:30+00:00Added an answer on June 18, 2026 at 2:30 pm

    So you want to do something like this pseudo-sql?

    select b.box_name, b.box_cost,
    bp2.end_time - bp2.start_time as box_shipping_duration,
    bp3.end_time - bp3.start_time as box_packing_duration,
    bp1.end_time - bp1.start_time as box_invoice_duration
    from boxes b
    
    join box_processids bpid on b.boxid = bpid.boxid
    
    left outer join box_processes bp1 on bpid.parentprocessid = bp1.parentprocess
    and processname = 'Invoiced'
    
    left outer join box_processes bp2 on bpid.parentprocessid = bp2.parentprocess
    and processname = 'Shipped'
    
    left outer join box_processes bp3 on bpid.parentprocessid = bp3.parentprocess
    and processname = 'Packed'
    

    (will need null checks, proper datetime handling, better names and so on)

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

Sidebar

Related Questions

I'm not entirely sure how I managed to jack this up. http://pretty-senshi.com If you
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
this is what i have right now Drawing an RSS feed into the php,
I have this code to decode numeric html entities to the UTF8 equivalent character.
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
This could be a duplicate question, but I have no idea what search terms
I have been unable to fix a problem with Java Unicode and encoding. The
I have just tried to save a simple *.rtf file with some websites and

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.