@Entity
@Table(name = "users")
public class User {
...
}
select a.nomer from allnomer as a
left join main as m
on m.numbernomer = a.nomer and (m.datestart > '2016-11-28' and m.datestart < '2016-11-30')
where m.id is null and a.type = 'lux'
order by a.number
limit 1;