1 | select * from naracki n where vreme = '2023-12-04 11:30:30.000' and telefon = '071000000'
|
---|
2 |
|
---|
3 |
|
---|
4 | select r.rec_ime, l.adresa, 'Готово' from so_koi sk
|
---|
5 | left join recepti r on
|
---|
6 | r.rec_id = sk.rec_id
|
---|
7 | left join opsluzuva o on
|
---|
8 | o.rec_id = r.rec_id
|
---|
9 | left join restorani r2 on
|
---|
10 | r2.res_id = o.res_id
|
---|
11 | left join se_naogja1 sn on
|
---|
12 | sn.res_id = r2.res_id
|
---|
13 | left join lokacii l on
|
---|
14 | l.l_id = sn.l_id
|
---|
15 | where vreme = '2023-12-04 11:30:30.000' and telefon = '071000000'
|
---|
16 | union
|
---|
17 | select r.rec_ime, l.adresa, s2.s_naziv from so_koi sk
|
---|
18 | left join recepti r on
|
---|
19 | r.rec_id = sk.rec_id
|
---|
20 | left join sodrzi s on
|
---|
21 | r.rec_id = s.rec_id
|
---|
22 | left join sostojki s2 on
|
---|
23 | s2.s_id = s.s_id
|
---|
24 | left join ja_ima ji on
|
---|
25 | ji.s_id = s2.s_id
|
---|
26 | left join prodavnici p on
|
---|
27 | p.pro_id = ji.pro_id
|
---|
28 | left join se_naogja2 sn on
|
---|
29 | sn.pro_id = p.pro_id
|
---|
30 | left join lokacii l on
|
---|
31 | l.l_id = sn.l_id
|
---|
32 | where vreme = '2023-12-04 11:30:30.000' and telefon = '071000000'
|
---|