
Database- Querying and Filtering Data
Database: An organized collection of structured information. Relational DB: To have relationship between table [includes structured & unstructured] ,query alone differs. Tasks: Retrieve film titles and their rental rates. Use column aliases to rename title as "Movie Title" and rental_rate as "Rate". I need only two columns which is title and rental_rate, and rename it as asked using AS. SELECT title AS "Movie Title", rental_rate AS "Rate" FROM film; 2.List customer names and their email addresses. Alias first_name and last_name as "First Name" and "Last Name". We have first name, last name, and email,rename the first two using AS. `` SELECT first_name AS "First Name", last_name AS "Last Name", email FROM customer;`` 3.Get a list of films sorted by rental rate in descending order. If two films have the same rental rate, sort them alphabetically by title. Sort by rental rate descending,if two values are same then sort by title in ascending. ``SELECT title, rental_rate FROM film ORDER BY
Continue reading on Dev.to
Opens in a new tab



