Advertisement
Guest User

Untitled

a guest
Oct 18th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 0.38 KB | None | 0 0
  1. SELECT DISTINCT p1.pid AS salle1, p2.pid AS salle2, p3.pid AS salle3, p1.capacite + p2.capacite + p3.capacite AS capacite_totale
  2. FROM batiments.LesPieces p1 CROSS JOIN batiments.LesPieces p2 CROSS JOIN batiments.LesPieces p3
  3. WHERE p1.pid <> p2.pid AND p2.pid <> p3.pid AND p1.pid <> p3.pid AND p1.capacite >= 50 AND p2.capacite >= 15 AND p3.capacite >=13
  4. ORDER BY capacite_totale DESC;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement