MatXps
search relation from resource in table throw error as name mismatch
select
count(*) as aggregate
from
items
where
exists (
select
*
from
item_user
where
items
.id
= item_user
.item_id
and user_id
= 31
)
and (
item_title
like % test %
or json_unquote(json_extract(favorite
, '$."user_id"')) like % test %
)3 replies