How to find the date range from the database and display only the duplicate?

Hello. There's a code.
$nnomer = $_POST['nnomer'];
SELECT datestart, dateend FROM main WHERE namenomer = :namenomer
$pdo = new PDO("mysql:host=;dbname=module;charset=utf8","root","");

$stmt = $pdo->prepare(SQL_GET_MENU_ITEM);
$res = $stmt->execute([':namenomer' => $nnomer]);
$row = json_encode($stmt->fetchAll(PDO::FETCH_OBJ));
echo "$row";
}catch(PDOException $e ){
exit( $e->getMessage());

DB looks at me like this:
The principle of operation of a script: From the site goes an ajax request with $_POST['nnomer']; (it is equal to lux), php inserts it into a pdo query to the database and gets the answer. Answer - first and last date of the date range. In my case the answer is:

Only 4 dates, but in fact there will be more.
So. Tell me how using php to find recurring dates? In my case, the recurring date is: 2016-12-01, 2016-12-02 and 2016-12-03. Is that possible to do?
July 2nd 19 at 13:54
1 answer
July 2nd 19 at 13:56
Write a query where you group and print the date where count > 2
Ala something
select count(datestart) as cnt, datestart FROM youTable
GROUP BY datestart
HAVING cnt > 1

condition complete themselves.. that would between have been

Find more questions by tags PHPDatabases