Efficient SQL Queries for Film Data Analysis
60 likes | 167 Views
Learn to craft SQL queries to analyze film information efficiently, including filtering by price, budget, runtime, and format. Sample SQL statements provided for practice.
Efficient SQL Queries for Film Data Analysis
E N D
Presentation Transcript
AFI Top Ten Database Ben English Emma Backman
Sample SQL Statements • SELECT * FROM [Purchasing Info] WHERE price < 15.99; • This SQL command string will return cheaper items from among the ten films listed. • SELECT * FROM Financials WHERE [Budget] > 2000000 • -This SQL command string will return all films with a budget in excess of two million dollars. • SELECT Title FROM [Title Info] WHERE [Runtime (minutes)] > 120 AND [Format for purchase] = ‘DVD’; • This SQL command string will return longer films (over two hours), and only those which are also on DVD. • UPDATE Financials SET Gross = 20000 WHERE ID=2; • This SQL command string will update (essentially rounding up) the listed gross amount for film number two – “City Lights”.