2015-04-16 1 views
1

Compte tenu de la folllowing requête SQL où je peux trouver le nom du plus cher Pizzatrouver MAX pour l'algèbre relationnelle

SELECT p.name 
FROM PIZZA p 
WHERE p.price=(
       SELECT MAX(p.price) 
       FROM PIZZA p 
       ); 

Comment pourrais-je faire cela en algèbre relationnelle? Si cela est bien

PROJECT p1.code - PROJECT p2.code(
            SELECT p1.price >= p2.price 
            (P(p1,p) X P(p2,p))) 

Répondre

0

Voici la réponse:

σ rownum() > 0 and rownum() ≤ 1 τ price desc π price Serves