SELECT
	c.nr as lig_nr,
	c.name AS lig_nos,
	a.nr as akta_nr,
	a.name as akta_nos,
	p.pasutijuma_datums,
	p.izpild_datums,
	p.izpildijuma_nr,
	o.name as objekts,
	concat(g.nr,".",j.nr)as nr,
	j.name as darbs,
	d.daudzums,
	p.contract_id,
	d.info_akt_id,
	d.pasutijuma_id
FROM 
	pasutijuma_darbi d
LEFT JOIN 
	pasutijums p
ON
	p.id=d.pasutijuma_id
LEFT JOIN
	object o
ON
	o.id=p.objekt_id
LEFT JOIN
	jobs j
ON 
	j.id=d.darba_id
LEFT JOIN
	job_group g
ON 
	g.id=j.job_group_id
LEFT JOIN
	akts a
ON 
	a.id=d.info_akt_id
LEFT JOIN
	contract c
ON 
	c.id=p.contract_id