Database Exercises
Sakila database/t1
- Set sakila database as active
- What tables are in the database?
- What is the structure of the actor table?
- Insert a record into the actor table with first_name=Teppo, last_name=Testi
- Display last names from the actor table
- Same as above but each last name only once
- Display all fields from the actor table
- Ordered by last_update
- Reverse order
- Date formatted as DD.MM.YYYY
- Date formatted as DD.MM.YYYY with custom headers
- Display the first 5 rows from the actor table
- Display rows 6-10 from the actor table
- Display all where first name is Christian
- Display all where first name is Christian or Helen
- Display those where actor_id is greater than 50
- Those where actor_id is between 50-60
- Those whose first name starts with letter J
- Those whose first name starts with letters JA
- Those whose name contains the letter A
- Those whose name's second letter is A
- Display the first 3 characters of the first name
- Print first name and last name in the same field
- Print initials
- Print full name and initials
- How many records are in the actor table
- How many first names start with the letter J
- Print first name and its frequency
- Print first name and its frequency ordered by frequency in descending order
- Like above but show only those with at least 3 occurrences
- Display the structure of the film table
- Average film length
- Same with one decimal precision
- Minimum, maximum and average film length