QUESTION SESSION NAME:Joins and Unions-1 QUESTION NAME: Join Two Tables - Descending TABLE DESCRIPTION Write a query using a join to determine which items were ordered by each of the customers in the customers table.
Select the customerid, firstname, lastname, and item for each customer purchased in the items_ordered table.
However display the results sorted by state in descending order. (Order the Last name in Descending order)
The items_ordered table description is as follows:
SESSION NAME:Joins and Unions-1 QUESTION NAME: Join Two Tables - Ascending TABLE DESCRIPTION Write a query using a join to determine which items were ordered by each of the customers in the customers table.
Select the customerid, firstname, lastname, and item for each customer purchased in the items_ordered table.
However display the results sorted by state in Ascending order. (Order the Customerid in Ascendingorder)
The items_ordered table description is as follows:
3 Comments
QUESTION
ReplyDeleteSESSION NAME:Joins and Unions-1
QUESTION NAME: Join Two Tables - Descending
TABLE DESCRIPTION
Write a query using a join to determine which items were ordered by each of the customers in the customers table.
Select the customerid, firstname, lastname, and item for each customer purchased in the items_ordered table.
However display the results sorted by state in descending order. (Order the Last name in Descending order)
The items_ordered table description is as follows:
SESSION NAME:Joins and Unions-1
ReplyDeleteQUESTION NAME: Join Two Tables - Ascending
TABLE DESCRIPTION
Write a query using a join to determine which items were ordered by each of the customers in the customers table.
Select the customerid, firstname, lastname, and item for each customer purchased in the items_ordered table.
However display the results sorted by state in Ascending order. (Order the Customerid in Ascendingorder)
The items_ordered table description is as follows:
SESSION NAME:Data Sorting
ReplyDeleteQUESTION NAME: DISTINCT - From CITY Table - Descending
TABLE DESCRIPTION
The "city" table consists of following fields:
1.ID
2. NAME
3. COUNTRYCODE
4. DISTRICT
5. POPULATION
Write a query to display all the data from city table and display the population column in Descending order.
ANSWER:
SELECT *
FROM CITY
ORDER BY POPULATION DESC;