@Query(value="SELECT i.name\n" +
"FROM item as i\n" +
"INNER JOIN items_receipts as ir\n" +
" ON i.id = ir.item_id\n" +
"INNER JOIN receipt as r\n" +
" ON ir.receipt_id = r.id\n" +
"GROUP BY i.id\n" +
"HAVING COUNT(r.id)=0"
,nativeQuery = true)
List<String> fiveSales();
Why this query doesn't seem to work? Is it because the count is null or something else?