23 lines
838 B
SQL
23 lines
838 B
SQL
.headers on
|
|
.mode csv
|
|
.output export.csv
|
|
SELECT *
|
|
FROM mosobjects m
|
|
LEFT JOIN mosobjlinks l ON m.objId=l.objId
|
|
LEFT JOIN mosobjects o ON l.planningId=o.objId
|
|
LEFT JOIN mosservers s1 ON m.mosId=s1.mosId
|
|
LEFT JOIN mosservers s2 ON o.mosId=s2.mosId
|
|
LEFT JOIN mosusers ucre1 ON m.createdBy=ucre1.userId
|
|
LEFT JOIN mosusers uchg1 ON m.changedBy=uchg1.userId
|
|
LEFT JOIN mosusers ucre2 ON o.createdBy=ucre2.userId
|
|
LEFT JOIN mosusers uchg2 ON o.changedBy=uchg2.userId
|
|
LEFT JOIN mosstatus st1 ON m.statusId=st1.statusId
|
|
LEFT JOIN mosstatus st2 ON o.statusId=st2.statusId
|
|
LEFT JOIN mosair a1 ON m.objAir=a1.airId
|
|
LEFT JOIN mosair a2 ON o.objAir=a2.airId
|
|
LEFT JOIN mosgroups g1 ON m.groupId=g1.groupId
|
|
LEFT JOIN mosgroups g2 ON o.groupId=g2.groupId
|
|
LEFT JOIN moslufs lu ON m.objId=lu.objId
|
|
WHERE g1.objGroup="OA Material" AND m.objSlug LIKE "%MAZ%"
|
|
;
|