Есть три таблицы:
CREATE TABLE sklad (
id int(11) NOT NULL auto_increment,
kod int(11) NOT NULL,
naimen varchar(255) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `kod` (`kod`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
CREATE TABLE tovar (
id int(11) NOT NULL auto_increment,
kod int(11) NOT NULL,
naimen varchar(255) NOT NULL,
kol double NOT NULL,
id_sklad_id int(11) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `kod` (`kod`),
KEY tovar_id_sklad_id` (`id_sklad_id`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
CREATE TABLE realise (
id int(11) NOT NULL auto_increment,
mkey_user_id int(11) NOT NULL,
dat date NOT NULL,
id_tovar_id int(11) NOT NULL,
kol double NOT NULL,
coment varchar(255) NOT NULL,
PRIMARY KEY (`id`),
KEY `realise_realise_mkey_user_id` (`mkey_user_id`),
KEY `realise_realise_id_tovar_id` (`id_tovar_id`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
SELECT realise.dat, tovar.id_sklad_id, tovar.naimen, tovar.kol, realise.kol
FROM tovar, realise
WHERE tovar.id=realise.id_tovar_id;