-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsqlite_filter.py
More file actions
32 lines (23 loc) Β· 960 Bytes
/
Copy pathsqlite_filter.py
File metadata and controls
32 lines (23 loc) Β· 960 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import sqlite3
def filter_high_budget_jobs():
print("π Starting Sudhir's Advanced DB Filtering Script...\n")
db_name = "sudhir_projects.db"
conn = sqlite3.connect(db_name)
cursor = conn.cursor()
try:
# SQL Command:Searching for jobs with a budget of over $100 only
select_query = "SELECT * FROM upwork_jobs WHERE budget > 100"
cursor.execute(select_query)
rows = cursor.fetchall()
print("π― Premium Jobs Found (Budget > $100):")
print("-" * 50)
for row in rows:
print(f"π ID: {row[0]} | πΌ Job: {row[1]} | π° Budget: ${row[2]}")
print("-" * 50)
print("\nπ DB Filtering executed successfully with zero inconsistencies!")
except Exception as e:
print(f"β Filtering Error: {e}")
finally:
conn.close()
if __name__ == "__main__":
filter_high_budget_jobs()