Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT DISTINCT p1.pid AS salle1, p2.pid AS salle2, p3.pid AS salle3, p1.capacite + p2.capacite + p3.capacite AS capacite_totale
- FROM batiments.LesPieces p1 CROSS JOIN batiments.LesPieces p2 CROSS JOIN batiments.LesPieces p3
- 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
- ORDER BY capacite_totale DESC;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement