Title | CSC1023 Practical 5 SQL2 Answer |
---|---|
Author | Tom Cunningham |
Course | Database Systems |
Institution | Queen's University Belfast |
Pages | 4 |
File Size | 528.5 KB |
File Type | |
Total Downloads | 38 |
Total Views | 126 |
Download CSC1023 Practical 5 SQL2 Answer PDF
CSC1023 Databases
Practical 5: SQL 2 | Built-In function, WHERE clause and Limiting/Ordering (Solution) As usual this practical will consist of a series of tasks. This week we will first continue with Northwind case with additional questions and questions with Built-In functions and complex query with WHERE and others (Limiting and Ordering).
After each question please show your work to one of the demonstrators for feedback. You might disagree with the stated “answer”, if so explain your thinking to the demonstrator.
A. Northwind Case The Northwind database is a very widely used example database and here it’s ported into MySQL. The version we’re using this week is the “simplified version” in that some of the more complex features have been removed because we cover them later in the module. You should take some time to get familiar with the structure (schema) and contents (data) of the database as we’ll be using it in a lot of examples. This is also an opportunity to learn your way around phpMyAdmin. The following answers can all be found just clicking through the interface in phpMyAdmin, you don’t yet have to use SQL. Note some of the methods you’ll need to find the answers to the following questions haven’t been covered in lectures or are detailed here – they should either be common sense or easily found by Google (or ask a demonstrator!). After completing questions in Practical 4, please try the additional questions below,
B. In-Built Function For all of the following write an SQL query execute it and paste it and the output into this document.
C. Complex Query with WHERE For all of the following write an SQL query execute it and paste it and the output into this document.
D. Ordering and Limiting
End of Practical 5...