i have added a connection with a MySQL database in QGIS (Add vector layer - Database - MySQL).
Is there an option to make a query over the database in QGIS?
You can achieve this using the DB Manager of QGIS.
You choose Database / Database Manager / Database Manager then Virtual Layers / Qgis Layers. At this stage you should be able to see all the tables opened (MySql, Postgre ...)
You can query these tables like any opened table : just click on the "wrench" icon ("SQL window") - this open an area in which u can edit your SQL query.
You can then load the result in the layer manager.