1
SELECT z.`id`, z.`ukupno` ,s.uk, (ukupno-uk) as r from zbirni z
join
(SELECT k.`iddzid`, (sum(kolicina*cjena)) as uk FROM kasa k join kasa_detalji d on d.idd=k.id group by iddzid) as s
on s.iddzid=z.id
where (ukupno-uk)>0
一個觀點,但我有錯誤 腳本行:1個視圖的SELECT語句包含在FROM子句中創建從SELECT語句的多個子查詢