Have the following full SQL:

SELECT
DS.DRUG_NAME AS DRUG_NAME,
SUM(INSTR(M.ASSOCIATED_TEXT, DS.SENSITIVE_STRING) > 0) AS SENSITIVE,
SUM(INSTR(M.ASSOCIATED_TEXT, DS.RESISTANT_STRING) > 0) AS RESISTANT,
ROUND(TOTAL(INSTR(M.ASSOCIATED_TEXT, DS.SENSITIVE_STRING) > 0) /
(TOTAL(INSTR(M.ASSOCIATED_TEXT, DS.SENSITIVE_STRING) > 0) +
TOTAL(INSTR(M.ASSOCIATED_TEXT, DS.RESISTANT_STRING) > 0)), 2) AS RATIO
FROM DRUG_SENSITIVITY_STRINGS DS
JOIN MSU M
WHERE M.ASSOCIATED_TEXT LIKE '%Nitrofurantoin..... R%'
GROUP BY DS.DRUG_NAME
ORDER BY RATIO DESC, RESISTANT ASC

Result is shown below.

No matter whether I do RESISTANT ASC or RESISTANT DESC
I can't get Nitrofurantoin at the bottom where I would like it to be.
How can I do this?

RBS

                                                     *Drug**Sensitive*
*Resistant**Ratio*Ertapenem 10201Meropenem301Pip/Tazobactam301
Cefalexin/Cefdrxl4070.85Gentamicin310.75CiprofloxacinS1570.68Amoxicillin2115
0.58Ampicillin760.54Trimethoprim18290.38Amoxyclavulanate6130.32
Nitrofurantoin0470Cefixime000Erythromycin000Fluclox(Met/Ox)000Penicillin000
Tetracycline00

0

Reply via email to