SHARE
TWEET

Untitled

a guest Oct 18th, 2019 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. SELECT ohjaaja.otunnus AS ohjtunnus, ohjaaja.onimi AS ohjnimi
  2. FROM ohjaaja
  3. WHERE otunnus IN
  4.     (SELECT voi_ohjata.otunnus
  5.     FROM voi_ohjata
  6.     LEFT JOIN rltunti ON voi_ohjata.rltunnus = rltunti.rltunnus
  7.     LEFT JOIN kategoria ON rltunti.ktunnus = kategoria.ktunnus
  8.     WHERE kategoria.knimi = 'Spinning')
  9. AND otunnus NOT IN
  10.     (SELECT voi_ohjata.otunnus
  11.     FROM voi_ohjata
  12.     LEFT JOIN rltunti ON voi_ohjata.rltunnus = rltunti.rltunnus
  13.     LEFT JOIN kategoria ON rltunti.ktunnus = kategoria.ktunnus
  14.     WHERE kategoria.knimi != 'Spinning')
  15. ORDER BY ohjaaja.otunnus ASC;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top