Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

Untitled

a guest Mar 13th, 2018 53 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. a)
  2.  
  3.  
  4. CREATE VIEW kuseng AS
  5.  
  6. SELECT  DISTINCT kind.child AS Kind, vetter.child AS Kuseng
  7. FROM    
  8.     windsor.parents AS kind,
  9.     windsor.parents AS eltern,
  10.     windsor.parents AS geschwister,
  11.     windsor.parents AS vetter,
  12.     windsor.royals
  13.  
  14. WHERE   (eltern.father = geschwister.father
  15.         AND
  16.     kind.father != vetter.father
  17.         AND
  18.     (kind.father = eltern.child
  19.         OR
  20.     kind.mother = eltern.child)
  21.         AND
  22.     (vetter.father = geschwister.child
  23.         OR
  24.     vetter.mother= geschwister.child)
  25.     )
  26.  
  27.     AND
  28.    
  29.     (vetter.child = royals.name
  30.         AND
  31.     royals.sex = 'm'
  32.     )
  33.    
  34.  
  35. ORDER BY kind.child
  36.  
  37.  
  38.  
  39.  
  40. b)
  41.  
  42. CREATE OR REPLACE VIEW bb AS
  43.  SELECT avg(2011 - royals.born) AS durschnittsalter, count(royals.*) AS anzahl
  44.    FROM windsor.royals
  45.   WHERE royals.died IS NULL;
  46.  
  47. ALTER TABLE bb OWNER TO haering;
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
 
Top