php – Msql query query to bring data

Hello, what happens is that I want to bring data to graph some elements in a general way. I do it with the following query

    $ query = SELECT the name, COUNT (e.serial) as total FROM survey e, data WHERE e.satisfaction = s.satisfaction GROUP BY e.satisfaccion & # 39 ;;
$ result = mysqli_query ($ with, $ query);

But I want to bring the serial numbers with a value MXDCJ3B0VR, to trace only the

There are two tables in the database that are composed as follows

Table 1

            Data .s
satisfaction int
Name varchar 

Table 2

        investigation .e
id Ai int
reason varchar
satisfaction int
varchar service
ip varchar
date varchar
varchar series 

Thanks for the help