1. Get supplier names for suppliers who supply part P2.
2. Get supplier names for suppliers who supply at least one red part.
3. Get supplier names for suppliers who supply all parts.
4. Get suppliers names for suppliers who supplies at least those parts supplied by S2
5. Get all pairs of supplier numbers such that the two suppliers are located in the same city
6. Select all suppliers name who do not supply parts p2
7. Find all supplier names and the total quantity supplied by them
8. Find all supplier names and the total quantity supplied by them as a desired output
9. Get color and city for non Paris parts with weight greater than 10
10. For all the parts get the parts no and weight as grams
This is not the only way to get the result but there could be more possible way to get the answer.
The above example can be written following way as well
The above example can be written following way as well
Interesting huh? What about more elegant way to write the above example?
I am showing them to write them different way so that readers can grab the technique easily.
2. Get supplier names for suppliers who supply at least one red part.
3. Get supplier names for suppliers who supply all parts.
4. Get suppliers names for suppliers who supplies at least those parts supplied by S2
5. Get all pairs of supplier numbers such that the two suppliers are located in the same city
Don't be fooled with the identifiers s1 and s2. For the above example, you may also write it like this:
6. Select all suppliers name who do not supply parts p2
7. Find all supplier names and the total quantity supplied by them
Another approach can be as following:
8. Find all supplier names and the total quantity supplied by them as a desired output
9. Get color and city for non Paris parts with weight greater than 10
10. For all the parts get the parts no and weight as grams
Post a Comment