
select queries
let's see about different queries and how it works 1. Retrieve Film Titles and Rental Rates SELECT title "Movie Title", rental_rate "Rate" FROM film; Explanation here I ma doing title is renamed as "Movie Name" and rental_rate is renamed as rate here why I use string----> when you give space without using string it does not exists. here without AS or with As no problem both is acceptable 2. Retrieve Customer Names and Email Query SELECT first_name "First Name", last_name "Last Name", email FROM customer; Explanation first_name is renamed to "First Name". and last_name is renamed to "Last Name". email is left unchanged because it is already clear. 3.Films sorted by rental rate (descending), then title SELECT title, rental_rate FROM film ORDER BY rental_rate DESC, title ASC; Explanation DESC is for highest first and ASC is for alphabetical. Used for ranking + tie-breaking. 4. Actor names sorted by last name, then first name SELECT first_name, last_name FROM actor ORDER BY last_name, firs
Continue reading on Dev.to Tutorial
Opens in a new tab




