|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
Re: Some query help
SGreen
unimin.com
Date: Fri Jul 01 2005 - 16:10:12 CDT
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
"Matt Babineau" <matt
criticalcode.com> wrote on 07/01/2005 05:05:28 PM:
> Hi Again -
>
> I need some more help with a query. I have a list of numbers (bandwidth
> required)... 2200, 2200, 2200, 400, 320
>
> My data looks like this:
>
> Bandwidth | Distance
> --------------------
> 2250 | 10km
> 1125 | 10km
> 622 | 10km
> 2250 | 20km
> 1125 | 20km
> 622 | 20km
> 2250 | 40km
> 1125 | 40km
> 622 | 40km
>
> I need the query to look at the list of numbers, and figure out that a
> certain distance has Bandwidths that are greater than each of the
numbers.
>
> SELECT DISTINCT(distance) FROM fiber_config WHERE fiber_type = 2 AND
> bandwidth > (2200, 2200, 2200, 220) ORDER BY distance ASC
>
> So I hope you can see what I am trying to get after. Basically I need to
> fins a distance that can fit each of the numbers in the list. So if 2200
is
> in the list, 2250 works. If 400 is in the list, 622 works. Thanks for
the
> help on this!
>
>
>
> Thanks,
>
> Matt Babineau
> Criticalcode
> 858.733.0160
> matt
criticalcode.com
> http://www.criticalcode.com
>
Actually, no. I can't see what you are trying to get after. I don't have
enough context to work from.
I just cannot visualize your problem well enough to help. What is the
tuple/list of numbers (2200,2200,2200,220) supposed to represent and how
would you use this list to find the records you wanted if you were doing
it "by hand"?
Imagine for me that none of this information is in a computer but has been
printed out on paper. Now describe for me the decision process you want to
perform and how I would do it using the printed lists. What would I need
to compare to come up with the correct choices?
Make sure you respond to the list so that everyone else can help, too!
Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]