blob: 57d86d3a7afa885b9399298c6936d2b8dba6a20e (
plain)
1
2
3
4
5
6
7
|
SELECT
parent_id AS folder_id,
COUNT(filename) FILTER (WHERE permissions LIKE '%__x%') AS nb_executables
FROM dtf.madelines_files
GROUP BY parent_id
HAVING COUNT(filename) FILTER (WHERE permissions LIKE '%__x%') >= 3
ORDER BY parent_id ASC NULLS FIRST
|