S
subs
ocity ost dcity dstate carrier price rank
a b c d ram 1000 1
a b c d ram1 1200 2
a b c d ram2 1233 3
p q r s ram1 1200 1
p q r s ram 1300 2
p q r s ram2 1340 3
o w m t ram1 1300 1
o w m t ram 1500 2
Pls see the above data. the carriers are ranked based on price for
every set of ocity/ost/dcity/dstate. This pattern of data continues
for rest of the table. now i want to have a query which will extract
all lanes where ram is ranked 1 and the associated lanes . the
associated lanes is the key here. For example if i run that query , it
will extract the first three rows in the above table- not just the
first row. Similarly if i run the query for ram1 as rank 1, i want it
to extract the last six rows of the table.
Can anyone pls help me with a query here- either SQL or in design
view. Thanks
a b c d ram 1000 1
a b c d ram1 1200 2
a b c d ram2 1233 3
p q r s ram1 1200 1
p q r s ram 1300 2
p q r s ram2 1340 3
o w m t ram1 1300 1
o w m t ram 1500 2
Pls see the above data. the carriers are ranked based on price for
every set of ocity/ost/dcity/dstate. This pattern of data continues
for rest of the table. now i want to have a query which will extract
all lanes where ram is ranked 1 and the associated lanes . the
associated lanes is the key here. For example if i run that query , it
will extract the first three rows in the above table- not just the
first row. Similarly if i run the query for ram1 as rank 1, i want it
to extract the last six rows of the table.
Can anyone pls help me with a query here- either SQL or in design
view. Thanks