SQLize Online / PHPize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
with t1 as ( select title, rating, case when rating="R" then 1 else 0 end as rnk, c.first_name, c.last_name from film f join inventory i on f.film_id = i.film_id join rental r on i.inventory_id = r.inventory_id join customer c on r.customer_id = c.customer_id where first_name = "KATIE" and last_name = "ELLIOTT" ) select title, rating from t1 order by rnk desc, rating ; show status like 'Last_query_cost';

Stuck with a problem? Got Error? Ask ChatGPT!

Copy Clear