### Database Schema:
CREATE TABLE connected (
	atom_id	TEXT	NOT NULL	PRIMARY KEY,
	atom_id2	TEXT	NOT NULL	PRIMARY KEY,
	bond_id	TEXT	NULL	DEFAULT NULL,
	foreign key (atom_id2) references atom (atom_id),
	foreign key (atom_id) references atom (atom_id),
	foreign key (bond_id) references bond (bond_id)
);

CREATE TABLE atom (
	atom_id	TEXT	NOT NULL	PRIMARY KEY,
	molecule_id	TEXT	NULL	DEFAULT NULL,
	element	TEXT	NULL	DEFAULT NULL,
	foreign key (molecule_id) references molecule (molecule_id)
);

CREATE TABLE bond (
	bond_id	TEXT	NOT NULL	PRIMARY KEY,
	molecule_id	TEXT	NULL	DEFAULT NULL,
	bond_type	TEXT	NULL	DEFAULT NULL,
	foreign key (molecule_id) references molecule (molecule_id)
);

CREATE TABLE molecule (
	molecule_id	TEXT	NOT NULL	PRIMARY KEY,
	label	TEXT	NULL	DEFAULT NULL
);

### User's Query:
Among all chemical compounds that contain molecule TR047, identify the percent that form a double-bond.

### Extra Knowledge:
TR047 is the molecule id; double bond refers to bond_type = ' = '; percentage = DIVIDE(SUM(bond_type = ' = '), COUNT(all bond_id)) as percent where molecule_id = 'TR047'
SELECT CAST(COUNT(CASE WHEN T.bond_type = '=' THEN T.bond_id ELSE NULL END) AS REAL) * 100 / COUNT(T.bond_id) FROM bond AS T WHERE T.molecule_id = 'TR047'