FlareStart
HomeNewsHow ToSources
FlareStart

Where developers start their day. All the tech news & tutorials that matter, in one place.

Quick Links

  • Home
  • News
  • Tutorials
  • Sources
  • Privacy Policy

Connect

© 2026 FlareStart. All rights reserved.

Back to articles
Filtering a DB using SQL Queries
NewsSystems

Filtering a DB using SQL Queries

via Dev.to TutorialChristina Sharon S2h ago

While practicing SQL, I worked on a movie rental database and tried solving different types of queries using conditions, sorting,limits and pattern matching. 1.Movies with rental rate > $3 SELECT * FROM film WHERE rental_rate > 3 ; 2.Rental rate > $3 AND replacement cost < $20 SELECT * FROM film WHERE rental_rate > 3 AND replacement_cost < 20 ; 3.Movies rated 'PG' OR rental rate = $0.99 SELECT * FROM film WHERE rating = 'PG' OR rental_rate = 0 . 99 ; 4.Top 10 movies by highest rental rate SELECT * FROM film ORDER BY rental_rate DESC LIMIT 10 ; 5.Skip first 5, fetch next 3 (ascending rental rate) SELECT * FROM film ORDER BY rental_rate ASC LIMIT 3 OFFSET 5 ; 6.First 5 movies sorted by title SELECT * FROM film ORDER BY title ASC LIMIT 5 ; 7.Skip first 10, fetch next 3 (highest replacement cost) SELECT * FROM film ORDER BY replacement_cost DESC LIMIT 3 OFFSET 10 ; 8.Top 5 movies with highest replacement cost (skip most expensive) SELECT * FROM film ORDER BY replacement_cost DESC LIMIT 5 O

Continue reading on Dev.to Tutorial

Opens in a new tab

Read Full Article
0 views

Related Articles

Amazon Spring Sale live blog 2026: Breaking discounts on Apple, Dyson, and more
News

Amazon Spring Sale live blog 2026: Breaking discounts on Apple, Dyson, and more

ZDNet • 33m ago

News

My Engineering Story

Medium Programming • 48m ago

News

Watch Bloomberg Europe Live

Medium Programming • 51m ago

We Autoscaled to 100 Pods — Then Ran Out of IP Addresses
News

We Autoscaled to 100 Pods — Then Ran Out of IP Addresses

Medium Programming • 1h ago

Pints meet prop bets: Polymarket’s “Situation Room” pop-up bar in DC
News

Pints meet prop bets: Polymarket’s “Situation Room” pop-up bar in DC

Ars Technica • 1h ago

Discover More Articles