SELECT CompanyId, `name 1` AS nazev, webURL, `phoneNumber 1` AS telefon, `phoneNumber 2` AS telefon2, `registrationNumber 2` AS ic,faxNumber, vatCode AS dic, text, companyEmployeValue, creationDate, exporter, importer, producer, distributor, serviceProducer, `street 1` AS ulice, `city 1` AS mesto, `zipCode 1` AS psc, geoLocX, geoLocY, firmy.klasifikace, firmy.zvyrazni_do FROM cz_maindatas LEFT JOIN firmy ON firmy.`id-firmy` = SUBSTR(cz_maindatas.CompanyId,3) LEFT JOIN cz_activitiesdatas USING(`CompanyId`) WHERE cz_maindatas.CompanyId = 'CZ508468'