Look at the following sentences:
While the man played the harmonium, the boys sang and the girls danced.
This sentence consists of two co-ordinate main clauses:
a) the boys sang
b) the girls danced
and one subordinate clause:
c) while the man played the harmonium
Now read the following sentence.
I knew that he was ill, but I did not know that he suffered from cancer.
This sentence consists of two coordinate main clauses:
a) I knew
b) but I did not know
and two subordinate clauses:
c) that he was ill
d) that he suffered from cancer
A sentence containing two or more main clauses and at least one subordinate clause is called a compound-complex sentence.
See also: Complex sentence