Project Overview 💡
In this project, you’ll learn how to connect to an SQLite database using Python and execute a SQL query with specific conditions. You’ll extract invoice records from a table where the billing country is Germany and the total amount is greater than or equal to 2.0.
Challenge Yourself! 🚀
Before checking the solution, try conquering the task on your own.
Task:
Write a Python script that:
Connects to an SQLite database file
Download this SQLite Database
The database looks like this:Queries the
invoices
table for rows whereBillingCountry
is 'Germany' andTotal
is >= 2.0Prints each result row
Expected Output: Each matching invoice record from the database will be printed in tuple form.
Give it a shot! Scroll down when you're ready for the step-by-step guide.