Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Select Statement

Author  Topic 

dr223
Constraint Violating Yak Guru

444 Posts

Posted - 2012-03-14 : 06:53:57
Hi,

I am working with Microsoft Access 2003 and would like to write a select statement to extract the data as shown below.

I have a query - QryCalcWPM which has the following data

A.BusinesType B.BusinessType Score
KIOSK MPESA 0.97
MPESA TAXI 0.97
KIOSK TAXI 0.95
MPESA TUKTUK 1.21
TAXI TUKTUK 1.25
KIOSK TUKTUK 1.18

Now, what the data means;

KIOSK - MPESA = 0.97 meaning (MPESA is better in ranking than KIOSK) since 0.97 < 1
MPESA - TAXI = 0.97 meaning ( TAXI is better in ranking than MPESA)since 0.97 < 1
KIOSK - TAXI = 0.95 meaning ( TAXI is better in ranking than KIOSK)
since 0.95 < 1
MPESA - TUKTUK = 1.21 meaning ( MPESA is better in ranking than TUKTUK) since 1.21 > 1
TAXI - TUKTUK = 1.25 meaning (TAXI is better in ranking than TUKTUK)since 1.25 > 1
KIOSK - TUKTUK = 1.18 meaning (KIOSK is better in ranking than TUKTUK)
since 1.18 > 1

Now, follow up the above ranking the 4 businesses should be ranked as follows;

1) TAXI
2) MPESA
3) KIOSK
4) TUKTUK


How can I write a query to extract such ranking for the business types based on the explanation ..

Thanks
   

- Advertisement -