Question
Need help with the following questions Relational algebra for the first question and pure SQL statements for the 2nd question.
Consider the following schema: The key fields are underlined. The Catalog relation list the process charged for parts by supplies. Write each of the following queries by relational algebra Find the sids of suppliers who supply every red or supply every green part Find pairs of sids such that the supplier with the first sid charges more for some part than the supplier with the second sid. Find the pids of parts supplied by at least two different suppliers. Find the pids of the most expensive parts supplied by suppliers named Ahmed Find the pids of parts supplied by every supplier at less than 200 Riyals. (If any supplier does not supply the part or charges more than 200 Riyals for it, the part is not selected.) Use the following schema to answer the following question in SQL Print the level and the average age of students for that level, for all levels expect junior. For each faculty member that has taught sections only in room R23014, print the faculty member's name and the total number of sections he has taught. Find the names of students enrolled in the maximum number of sections Find the names of students not enrolled in any section For each age value that appears in Student, find the level value that appears most often. For example, if there are more freshman level students aged 18 than senior of junior or sophomore students aged 18, you should print the pair (18 Freshman).
Explanation / Answer
1) ?sid (Supplier (Join Symbol) sid=sid(Catalog (join symbol) pid=pidSigmacolor=red OR color = green (Part)))
2)
3)
2nd Part
Queries