-- First lecture SELECT examples.
-- Run 01-bankovnictvi-import.sql before executing these queries.

-- This query returns all columns from the accounts table.
SELECT * FROM accounts;

-- Select only the account number and bank identifier.
SELECT account_number, bank_id FROM accounts;

-- Use WHERE to filter specific records.
SELECT * FROM accounts WHERE currency = 'CZK';

SELECT * FROM accounts WHERE balance > 1000;

SELECT * FROM accounts WHERE balance < 1000 AND currency = 'CZK';

SELECT * FROM accounts WHERE balance > 1000 AND currency = 'CZK';

SELECT *
FROM accounts
WHERE (
        currency = 'USD'
        OR currency = 'EUR'
    )
    and balance < 1000;

SELECT * FROM accounts WHERE currency IN ('CZK', 'USD');

SELECT * FROM accounts WHERE currency NOT IN ('CZK', 'USD');

SELECT * FROM clients WHERE email IS NULL;

SELECT * FROM clients WHERE name LIKE 'Ja%';
