troubleshooting Question

Select smallest value from a list by categories

Avatar of jdr0606
jdr0606Flag for United States of America asked on
Microsoft SQL Server
2 Comments1 Solution63 ViewsLast Modified:
I have a process in which I'm trying to determine which is the shortest ship transit time from one location versus another.

For example if I'm shipping a package to first 3 digits of zip from zipcode 38133 it is 3 days but if shipping from zipcode 02189 it is 1 day I would want to select the transit day for 02189 at 1 day. For this example I have a table (have attached an example of the rows and values and I want to first select the transit days from the origin to the zip3 and then compare to all the origin transit days to the same zip3 and return the fastest (smallest vale).

Zip3      DestinationState      Zone      TransitDays      TransitType      OriginZip      Carrier
011      MA      2      1      FXG      02189      FedEx
011      MA      6      3      FXG      38133      FedEx
011      MA      8      5      FXG      97214      FedEx
011      MA      8      5      FXG      98108      FedEx

in the above the origin is 38133 with a transit of 3 and i'd want to compare to the resulting 02189 with 1 the shortest transit days.
Software Developer

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros