1. Aprender
  2. /
  3. Cursos
  4. /
  5. Querying a PostgreSQL Database in Java

Connected

Exercício

Filtering the data

CityBook Libraries wants users to search for available books by publication year. Users will input a year, and the system should return all available books published in or after that year.

You will use a secure approach with prepared statements. The HikariSetup class is already configured for you.

Instruções

100 XP
  • Write the WHERE clause to query books with publication year greater than or equal to a placeholder.
  • Filter based on status, allowing only 'available' books.
  • Set the publication year parameter for the prepared statement.