select * from naracki n where vreme = '2023-12-04 11:30:30.000' and telefon = '071000000'


select r.rec_ime, l.adresa, 'Готово' from so_koi sk 
	left join recepti r on
		r.rec_id = sk.rec_id 
	left join opsluzuva o on
		o.rec_id = r.rec_id 
	left join restorani r2 on
		r2.res_id = o.res_id
	left join se_naogja1 sn on
		sn.res_id = r2.res_id
	left join lokacii l on
		l.l_id = sn.l_id 
where vreme = '2023-12-04 11:30:30.000' and telefon = '071000000'
union 
select r.rec_ime, l.adresa, s2.s_naziv  from so_koi sk 
	left join recepti r on
		r.rec_id = sk.rec_id
	left join sodrzi s on
		r.rec_id = s.rec_id
	left join sostojki s2 on
		s2.s_id = s.s_id 
	left join ja_ima ji on
		ji.s_id = s2.s_id
	left join prodavnici p on
		p.pro_id = ji.pro_id 
	left join se_naogja2 sn on
		sn.pro_id = p.pro_id 
	left join lokacii l on
		l.l_id = sn.l_id 
where vreme = '2023-12-04 11:30:30.000' and telefon = '071000000'
