Filtering many to many relations
Does anyone know how to filter based on two tables with a many to many relations? I keep geeting the following error
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'tags' in 'where clause'
SELECT
count(*) AS aggregate
FROM
WHERE
(
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'tags' in 'where clause'
SELECT
count(*) AS aggregate
FROM
tasksWHERE
(
tags IN (2))