0% found this document useful (0 votes)
46 views1 page

Using The UNION Clause.: Assignment - 13

1) The document contains instructions for three SQL queries using UNION clauses. The first query unions customer names, cities and ratings, labeling high ratings as "High Rating" and low ratings as "Low Rating". 2) The second query unions the name and number of each salesperson and customer with more than one current order, ordering the results alphabetically. 3) The third query unions the snums of salespeople in San Jose, the cnums of customers in San Jose, and the onums of orders on October 3rd, retaining duplicates between the last two queries but eliminating redundancies between either of those and the first query.

Uploaded by

Pranit Pednekar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views1 page

Using The UNION Clause.: Assignment - 13

1) The document contains instructions for three SQL queries using UNION clauses. The first query unions customer names, cities and ratings, labeling high ratings as "High Rating" and low ratings as "Low Rating". 2) The second query unions the name and number of each salesperson and customer with more than one current order, ordering the results alphabetically. 3) The third query unions the snums of salespeople in San Jose, the cnums of customers in San Jose, and the onums of orders on October 3rd, retaining duplicates between the last two queries but eliminating redundancies between either of those and the first query.

Uploaded by

Pranit Pednekar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Assignment 13

Using the UNION clause.


1) Create a union of two queries that shows the names, cities, and ratings of all
customers. Those with rating of 200 or greater will also have the words High
Rating, while the others will have the words Low Rating.
2) Write a command that produces the name and number of each salesperson and
each customer with more than one current order. Put the results in alphabetical
order.
3) Form a union of three queries. Have the first select the snums of all salespeople in
San Jose; the second, the cnums of all customers in San Jose; and the third the
onums of all orders on October 3. Retain duplicates between the last two queries
but eliminate any redundancies between either of them and the first.
(Note: in the sample tables as given, there would be no such redundancy. This is
besides the point.)

Sameer Dehadrai

Page: 1

You might also like