CREATE TABLE customer_payments (customer_id NUMBER, datetime_payment TIME, payment_method_code CLOB, amount_payment NUMBER)
CREATE TABLE customers (customer_id NUMBER, customer_address_id NUMBER, customer_status_code CLOB, date_became_customer TIME, date_of_birth TIME, first_name CLOB, last_name CLOB, amount_outstanding NUMBER, email_address CLOB, phone_number CLOB, cell_mobile_phone_number CLOB)
CREATE TABLE staff (staff_id NUMBER, staff_address_id NUMBER, nickname CLOB, first_name CLOB, middle_name CLOB, last_name CLOB, date_of_birth TIME, date_joined_staff TIME, date_left_staff TIME)
CREATE TABLE addresses (address_id NUMBER, line_1_number_building CLOB, city CLOB, zip_postcode CLOB, state_province_county CLOB, country CLOB)
CREATE TABLE lessons (lesson_id NUMBER, customer_id NUMBER, lesson_status_code CLOB, staff_id NUMBER, vehicle_id NUMBER, lesson_date TIME, lesson_time CLOB, price NUMBER)
CREATE TABLE vehicles (vehicle_id NUMBER, vehicle_details CLOB)

How many lessons were taught by a staff member whose first name has the letter 'a' in it?
SELECT COUNT(*) FROM lessons AS T1 JOIN staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name LIKE "%a%"
SELECT COUNT(*) FROM "lessons" "T1" JOIN "staff" "T2" ON "T1"."staff_id" = "T2"."staff_id" AND "T2"."first_name" LIKE "%a%"