Sobes.tech
Junior — Middle

What types of database queries are you proficient in?

sobes.tech AI

Answer from AI

I am familiar with the basic types of database queries, including:

  • SELECT — for retrieving data from tables.
  • INSERT — for adding new records.
  • UPDATE — for modifying existing data.
  • DELETE — for deleting records.

I am also familiar with using JOIN to combine data from multiple tables, as well as filtering data with WHERE, sorting with ORDER BY, and grouping with GROUP BY.

An example of a simple query in Python using the sqlite3 library:

import sqlite3

conn = sqlite3.connect('example.db')
cursor = conn.cursor()

cursor.execute("SELECT id, name FROM users WHERE age > ?", (18,))
rows = cursor.fetchall()
for row in rows:
    print(row)

conn.close()