SESSION NAME: Data Sorting.
QUESTION NAME: Union ALL - Query Descending.
TABLE DESCRIPTION:
The "customers" table has following field
1. customerid
2. firstname
3. lastname
4. city
5. state
The "suppliers" table has following field
1. SupplierID
2. SupplierName
3. ContactName
4. Address
5. City
6. PostalCode
7. Country
8.Phone
Write a query to display city from customers tables and
suppliers table using "UNION ALL" clause.
The final resultant should be in Descending order.
1. customerid
2. firstname
3. lastname
4. city
5. state
The "suppliers" table has following field
1. SupplierID
2. SupplierName
3. ContactName
4. Address
5. City
6. PostalCode
7. Country
8.Phone
Write a query to display city from customers tables and
suppliers table using "UNION ALL" clause.
The final resultant should be in Descending order.
CODE:
select city from customers union select city from suppliers order by city desc;
1 Comments
it is not the correct answer
ReplyDelete