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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T02:27:34+00:00 2026-05-22T02:27:34+00:00

I need a table that stores items and tracks when an item is… queued

  • 0

I need a table that stores items and tracks when an item is…

  1. queued
  2. marked for shipping
  3. shipped
  4. marked for return
  5. returned

The table also needs to tell me how many items a customer…

  1. has received in a month
  2. has at home at this time

I tried using inheritance. I assigned each step a typeId (from 1 to 5, each id representing the current step in the workflow). This approach is not ideal because updating a workflow step erases history.

For example, if an item moves from shipped (typeId 3) to returned (typeId 5) we lose an accurate count for shipped items.

How should I approach this? Also, I prefer to keep the data in one table unless I get a compelling reason not to.

Update

Items are mailed to customers incrementally. There are limits to how many items a customer can receive within a month period, and limits on how many items a customer can have at home at any given time. For this example, let’s assume 4 for earlier and 2 for the latter. A customers queue can have any number of items. For this reason, items in the queue need to be ranked so the order of items sent can be according to the customers preference.

Items that have shipped already will need to fall out of ranking (the customer can no longer modify rank after an item is sent).

  • 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-22T02:27:34+00:00Added an answer on May 22, 2026 at 2:27 am

    No inheritance here. Time fields are actually date-time. A row is entered into the Tracking table when a customer adds an item to the queue. Other time columns from TimeMarkedShip to TimeReturned are NULL until the action happens. The TimeQueued is part of the primary key in order to allow a customer to rent an item more than once (sounds like video rentals to me).

    enter image description here

    To count items that a customer has at home you could use something like

    select count(1)
    from Tracking
    where CustomerID = 1755
      and TimeShipped  is not NULL
      and TimeReturned is NULL ; 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to insert records into a table that has no primary key using
I have an SQLite table that contains a BLOB I need to do a
I have a table that contains maybe 10k to 100k rows and I need
I have a table that got into the db_owner schema, and I need it
A table exists that someone else loaded. I need to query against the table,
I need a select from table which does not have column that tells when
So I need to track changes that happen on a Mysql table. I was
I need to do a join with a table/result-set/whatever that has the integers n
I have a Word document that starts with a Table of Contents. I need
Folks, I need a solution that allows drag-and-drop cell over the table. The cells

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.