Sunday, 11 October 2020, 12:00 AM
Sunday, 11 October 2020, 12:00 AM
Sunday, 11 October 2020, 12:00 AM
Lab 5
1. Use the "classicmodels" database from Lab 2.
2. Select the "classicmodels" as your current database.
3. Develop statements to do the following tasks:
1. Select customerNumber, COUNT(*) alias 'Number of Orders', from the orders table,
where the year of the shippedDate = 2005. Group by customerNumber.
2. Select productCode, SUM(quantityOrdered * priceEach) alias Total from the orders
table. Create an inner join with the orderdetails table on the orderNumber. Group by the
productCode, having a productCode between 'S00' and 'S50'. Sort descending, by total.
4. Test the commands in the mysql.
5. When you have been able to test it successfully, copy the scripts into notepad.
6. Finally, copy the script from Notepad to this Lab.
Lab 6
Sunday, 11 October 2020, 12:00 AM
o Create the "tasks2" table using the structure of the "tasks" table.
o Using the INSERT and SELECT statements, copy the data from the tasks table to
the tawosks2 table.
When you have been able to test it successfully, copy the scripts into a tool like Notepad is.