Código SQL [-] Select id from cliente c where not exists ( select 1 from venta v where v.cliente = c.cliente and v.fecha >= now - (365 * 2) )
Select id from cliente c where not exists ( select 1 from venta v where v.cliente = c.cliente and v.fecha >= now - (365 * 2) )