This is the query I am trying to execute but it doesn't work.
ALTER TABLE values ADD UNIQUE(id_cod, id_op, (SELECT date(V.completed_date) FROM values V;));
I have these 3 columns in the values table: id_cod
, id_op
and completed_date
which I want to use for the UNIQUE KEY
but it is vital to me that I only use the date part of the date-time.