select t.cantitate from pacient p, diagnostic d, tratament t where p.cnp = d.cnp and d.cod_diagnostic = t.cod_diagnostic and p.cnp = '186.........'
sau cu inner join
select t.cantitate from pacient p
inner join diagnostic on p.cnp = d.cnp
inner join tratament t on d.cod_diagnostic = t.cod_diagnostic
where p.cnp = '186.....'
teoretic ar trebui sa mearga ambele, posibil sa mai fie niste typo-uriverifici tu.



verifici tu.
Răspunde cu citat