Find all pizzas eaten by at least one female over the age of 20.


SUBMITTED BY: Guest

DATE: Nov. 16, 2013, 3:23 a.m.

FORMAT: Text only

SIZE: 987 Bytes

HITS: 1379

  1. 1. Find all pizzas eaten by at least one female over the age of 20.
  2. \project_{pizza}(
  3. (\project_{name} // nombre de todas las female
  4. \select_{gender='female' and age > 20}
  5. Person
  6. )
  7. \join Eats
  8. )
  9. 2.Find the names of all females who eat at least one pizza served by Straw Hat.
  10. (Note: The pizza need not be eaten at Straw Hat.)
  11. \project_{name}(
  12. (\project_{name} // nombre de todas las female
  13. \select_{gender='female'}
  14. Person
  15. )
  16. \join
  17. (
  18. ( Eats)
  19. \join
  20. ( \select_{pizzeria='Straw Hat'} Serves)
  21. )
  22. )
  23. 3. Find all pizzerias that serve at least one pizza for less than $10
  24. that either Amy or Fay (or both) eat.
  25. \project_{pizzeria} (
  26. ( \select_{price < 10} Serves )
  27. \join
  28. ( \select_{name='Amy' or 'Fay'} Eats )
  29. )

comments powered by Disqus