Finding the null rate of the column deice_id : I'm trying to write a code that will display the null count for a column in a table 

I wrote the code below but i've been running into a syntax issue 

SELECT device_id AS FIELD, COUNT (*) FROM (SELECT * FROM TABLE WHERE
TRIM(UPPER(device_id) IN ('','NULL',) OR device_id IS NULL OR SUBSTRING(TRIM(UPPER(device_id)), 1,1) = '-') 
AND (event_date between '2019-05-20' AND '2019-05-27'));

I've been experiencing a syntax error