The tables that are available in the exercise are:
Master
master_id |INT ----> PRIMARY KEY
name | VARCHAR ----> ALTERNATIVE KEY
curriculum_rev | DATE
Subject
subject_id | VARCHAR -----> PRIMARY KEY
name | VARCHAR
language | ENUM
description |VARCHAR
ECTS | INT
m_id | INT ----> FOREIGN KEY REFERENCES master_id
Question: You want to get a MySQL statement showing the name of the master, subjects, credits and language taught but only those that do not have a description and the revision of the curriculum (curriculum_rev) of the Master is prior to 2016.
For this, I have made the following sentence:
select m.name,s.name,s.'language',s.ECTS
from master m, subject s
where m.master_id=s.m_id AND description is null AND m.curriculum_date < 2016
It gives me a syntax error and I suppose it is with the treatment of the date. How can I do it? Thanks.