SHARE
TWEET

Untitled

a guest Dec 12th, 2018 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /* 1
  2. SELECT login
  3. FROM uzivatel
  4. WHERE rok_narozeni
  5. between 1980 AND 1990
  6. OR rok_narozeni % 2 = 0
  7. */
  8. /* 2
  9. SELECT
  10. DISTINCT k.rok
  11. FROM koupil k, vyrobek v
  12. WHERE k.vID = v.vID
  13. AND v.jmeno = 'lampa'
  14. */
  15.  
  16. /* 3
  17. SELECT
  18. DISTINCT
  19. v.jmeno
  20. FROM vyrobek v, koupil k, uzivatel u
  21. WHERE k.vID = v.vID
  22. AND u.mesto like '%a'
  23. ORDER BY v.jmeno DESC
  24. */
  25.  
  26. /* 4
  27. SELECT
  28. DISTINCT v.jmeno
  29. FROM vyrobek v, koupil k
  30. WHERE k.vID = v.vID
  31. AND k.login = 'vinetu'
  32. INTERSECT
  33. SELECT
  34. DISTINCT v.jmeno
  35. FROM vyrobek v, koupil k
  36. WHERE k.vID = v.vID
  37. AND k.login = 'pepik'
  38. */
  39.  
  40. /* 5
  41. SELECT
  42. DISTINCT v.jmeno
  43. FROM vyrobek v, koupil k
  44. WHERE k.vID = v.vID
  45. AND k.login = 'vinetu'
  46. EXCEPT
  47. SELECT
  48. DISTINCT v.jmeno
  49. FROM vyrobek v, koupil k
  50. WHERE k.vID = v.vID
  51. AND k.login = 'pepik'
  52.  
  53. */
  54.  
  55. SELECT
  56. DISTINCT jmeno
  57. FROM vyrobek
  58. EXCEPT
  59. SELECT
  60. DISTINCT v.jmeno
  61. FROM vyrobek v, koupil k
  62. WHERE v.vID = k.vID
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