Apparatus for measuring the composition and flow rate of a fluid (1) comprising a mixture of e.g. oil and water in a pipe (2), wherein an integrated mechanical structure (3) serves as a microwave resonator sensor and as a differential pressure element for providing permittivity and flow rate measurements, respectively. 2.