I need to search the different dates of the table, and search for the values corresponding to a certain period, in the same search ... already tried some possibilities and did not work
$datai = date("Y-m-01");
$dataf = date("Y-m-t");
$stmt = getConn()->query("SELECT DISTINCT(data) FROM banco GROUP BY YEAR(data), MONTH(data) ORDER BY data DESC");
$categorias = $stmt->fetchAll(PDO::FETCH_OBJ);