This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on May 18th, 2013  |  syntax: T-SQL  |  size: 0.72 KB  |  views: 59  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. SELECT Dyspnoea.d, SUM(Dyspnoea.p*Either.p*Tuberculosis.p*Asia.p*p*Smoking.p*Bronchitis.p)
  2.         --SELECT Dyspnoea.d, SUM(((Dyspnoea.p*Either.p*Tuberculosis.p*Asia.p)+(Dyspnoea.p*Either.p*LungCancer.p*Smoking.p)) + (Dyspnoea.p*Bronchitis.b*Smoking.p))
  3.         SELECT Dyspnoea.d, SUM(Dyspnoea.p*Either.p*Tuberculosis.p*Asia.p*p*Smoking.p*Bronchitis.p)
  4.         FROM Dyspnoea
  5.         INNER JOIN Either ON Dyspnoea.e = Either.e
  6.         INNER JOIN Tuberculosis ON Either.t = Tuberculosis.t
  7.         INNER JOIN Asia ON Tuberculosis.a = Asia.a
  8.         INNER JOIN LungCancer ON Either.l = LungCancer.l
  9.         INNER JOIN Bronchitis ON Dyspnoea.b = Bronchitis.b
  10.         INNER JOIN Smoking ON LungCancer.s = Smoking.s AND Bronchitis.s = Smoking.s
  11.         WHERE Asia.a = 1 AND Smoking.s = 0
  12.         GROUP BY Dyspnoea.d
clone this paste RAW Paste Data