How to return script IDs not in policies I need to identify a list of scripts not in use via our mySQL database. 
Active policies have a "created_by" value of "JSS" in the "policies" table. All Scripts are listed in the "scripts" table. Scripts used in all policies are listed in the "policy_scripts" table. "scrips.script_id" and "policy_scripts.script_id" are the same.  

table: policies
column: policy_id
column: created_by

table: scripts
column:script_id
column: file_name

table: policy_scripts
column: script_id
column: policy_id

My Two attempts were:

    SELECT DISTINCT
    s.file_name
FROM
    policy_scripts AS ps
        LEFT JOIN
    scripts AS s ON ps.script_id = s.script_id
WHERE
    ps.script_id != ANY (SELECT 
            script_id
        FROM
            scripts)
ORDER BY s.file_name;


and 

SELECT 
    COUNT(DISTINCT script_id)
FROM
    policy_scripts
WHERE
    script_id != ANY (SELECT 
            script_id
        FROM
            scripts); 


however I don't think this is working as intended... It also does not take into account active policies. I'm not sure how to add that in.  

any help would be appreciated.
select script_id 
from scripts s
    left outer join policy_scripts ps on ps.script_id = s.script_id
where ps.policy_id is NULL;